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

Unable to define securityContext for Pods created by operator #246

Open
sankalp28 opened this issue Sep 30, 2022 · 1 comment
Open

Unable to define securityContext for Pods created by operator #246

sankalp28 opened this issue Sep 30, 2022 · 1 comment

Comments

@sankalp28
Copy link

I want to define the following securityContext for all containers created by the redis enterprise operator:

securityContext:
  capabilities:
    drop:
    - ALL
  runAsNonRoot: true
  runAsUser: 1001
  allowPrivilegeEscalation: false
  readOnlyRootFilesystem: true
  seccompProfile:
     type: RuntimeDefault

I think I can define them in the CRD for

redisEnterpriseAdditionalPodSpecAttributes:
  ephemeralContainers:
    securityContext:

redisEnterpriseAdditionalPodSpecAttributes:
  initContainers:
    securityContext:

servicesRiggerSpec:
  ephemeralContainers:
    securityContext:

servicesRiggerSpec:
  initContainers:
    securityContext:
sideContainersSpec:
  securityContext:

But where can I define the regular containers?

Also redisEnterpriseAdditionalPodSpecAttributes.ephemeralContainers is an array, so I guess I need to specify the names of the containers too like this?

redisEnterpriseAdditionalPodSpecAttributes:
  ephemeralContainers:
    - name: some-ephemeral-container
       securityContext:

However I have no idea where to find those names.
Could you please give me any advice or tell me if its even possible?

@sankalp28
Copy link
Author

any updates on this ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant