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

Fix containerSecurityContext for init-container #861

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

marulkan
Copy link
Contributor

Description

Documentation states that containerSecurityContext should also affect the init-container, this patch should actually apply this previously missing feature.

Documentation already contains this as a NOTE under https://github.com/grafana-operator/grafana-operator/blob/master/documentation/deploy_grafana.md#configuring-the-deployment

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • This change requires a documentation update
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a test case that will be used to verify my changes
  • Verified independently on a cluster by reviewer

Verification steps

Ensure that deployment.containerSecurityContext is propagated to initContainer.
grafana.yaml

apiVersion: integreatly.org/v1alpha1
kind: Grafana
metadata:
  name: grafana
spec:
  client:
    preferService: true
  ingress:
    enabled: False
  config:
    log:
      mode: "console"
      level: "error"
    log.frontend:
      enabled: true
    auth:
      disable_login_form: False
      disable_signout_menu: True
    auth.anonymous:
      enabled: True
  service:
    name: "grafana"
    labels:
      app.kubernetes.io/name: grafana
      type: "grafana"
  dashboardLabelSelector:
    - matchExpressions:
        - { key: app, operator: In, values: [grafana] }
  resources:
    limits:
      cpu: 200m
      memory: 200Mi
    requests:
      cpu: 100m
      memory: 100Mi
  deployment:
    containerSecurityContext:
      allowPrivilegeEscalation: false

Documentation states that containerSecurityContext should also affect
the init-container, this patch should actually apply this previously
missing feature.
@pb82
Copy link
Collaborator

pb82 commented Dec 20, 2022

thanks @marulkan

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

Successfully merging this pull request may close these issues.

2 participants