Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If a pod requires a serviceaccount, the simulated pod won't run #129

Open
drmorr0 opened this issue Sep 12, 2024 · 1 comment
Open

If a pod requires a serviceaccount, the simulated pod won't run #129

drmorr0 opened this issue Sep 12, 2024 · 1 comment
Assignees
Labels
bug Something isn't working sk-driver Issues with the Simulation runner sk-tracer Issues with the Kubernetes tracer

Comments

@drmorr0
Copy link
Contributor

drmorr0 commented Sep 12, 2024

Describe the bug

If a pod has the serviceAccount field set in the trace, then the simulated version of the pod won't run because the serviceAccount doesn't exist in the virtualized namespace.

Steps to reproduce

  1. Create a trace with a deployment like the following:
piVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  namespace: default
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 2 # tells deployment to run 2 pods matching the template
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80
      serviceAccount: foobar
  1. Try to run the trace in SimKube
  2. The pods won't be scheduled, because of the following error:
Error creating: pods "nginx-deployment-6bdc77d84d-" is forbidden: error looking up service account default/foobar: serviceaccount "foobar" not found

Expected behavior

The pod should get scheduled in the simulated cluster.

Additional Info

Kubernetes Version: any
Environment (kind, EKS, self-managed/hosted, etc.): any
Affected components (sk-vnode, sk-cloudprov, sk-ctrl, sk-driver, skctl, sk-tracer): sk-driver

@drmorr0 drmorr0 self-assigned this Sep 12, 2024
@drmorr0 drmorr0 added bug Something isn't working sk-tracer Issues with the Kubernetes tracer sk-driver Issues with the Simulation runner labels Sep 12, 2024
@drmorr0
Copy link
Contributor Author

drmorr0 commented Sep 12, 2024

You "should" be able to resolve this by including the serviceAccount object in the trace_config, but I'd like to have a solution that doesn't require that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sk-driver Issues with the Simulation runner sk-tracer Issues with the Kubernetes tracer
Projects
None yet
Development

No branches or pull requests

1 participant