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

chore: add steps to validate pod templates #59

Merged
merged 6 commits into from
Oct 3, 2024
Merged

Conversation

ravisingal
Copy link
Contributor

No description provided.

@ravisingal ravisingal requested a review from abeytom07 October 2, 2024 09:17
@ravisingal ravisingal changed the title Check pod template chore: add steps to validate pod templates Oct 2, 2024
aaron-steinfeld
aaron-steinfeld previously approved these changes Oct 2, 2024
@abeytom07
Copy link

@ravisingal You need to override/disable in the other subcharts?

kstreams-app-version-checker:
  containerSecurityContext:
    {{ .tfi.containerSecurityContext | toYaml | nindent 4 }}
  podSecurityContext:
    {{ .tfi.podSecurityContext | toYaml | nindent 4 }}
  commonPodLabels:
    applicationid: ABCD1234

  commonPodAnnotations:
    applicationid: ABCD1234

podSecurityContext:
  {{ .tfi.podSecurityContext | toYaml | nindent 2 }}

containerSecurityContext:
  {{ .tfi.containerSecurityContext | toYaml | nindent 2 }}
  
hypertrace-pinot:
  containerSecurityContext:
    {{ .tfi.containerSecurityContext | toYaml | nindent 4 }}
  
  podSecurityContext:
    {{ .tfi.podSecurityContext | toYaml | nindent 4 }}  

redis:
  master:
    containerSecurityContext:
      {{ .tfi.containerSecurityContext | toYaml | nindent 6 }}
    
    podSecurityContext:
      {{ .tfi.podSecurityContext | toYaml | nindent 6 }}
  metrics:
    containerSecurityContext:
      {{ .tfi.containerSecurityContext | toYaml | nindent 6 }}      

config-bootstrapper:
  containerSecurityContext:
    {{ .tfi.containerSecurityContext | toYaml | nindent 4 }}
  
  podSecurityContext:
    {{ .tfi.podSecurityContext | toYaml | nindent 4 }}

db-schema-manager:
  enabled: false

postgresql:
  primary:
    containerSecurityContext:
      {{ .tfi.containerSecurityContext | toYaml | nindent 6 }}
    
    podSecurityContext:
      {{ .tfi.podSecurityContext | toYaml | nindent 6 }}
  metrics:
    containerSecurityContext:
      {{ .tfi.containerSecurityContext | toYaml | nindent 6 }}
    
    podSecurityContext:
      {{ .tfi.podSecurityContext | toYaml | nindent 6 }}      

commonPodLabels:
  applicationid: ABCD1234

commonPodAnnotations:
  applicationid: ABCD1234  

@ravisingal ravisingal merged commit 7fc8e2e into main Oct 3, 2024
2 checks passed
@ravisingal ravisingal deleted the check-pod-template branch October 3, 2024 13:27
@abeytom07
Copy link

abeytom07 commented Oct 4, 2024

@ravisingal @aaron-steinfeld May be we need to support a custom override

uses: hypertrace/github-actions/validate-charts@main
with:
  chart-path: ./helm-test
  extra-values: |
     my-service:
        podSecuritycontext:
          runAsUser: 12345

Yes, the same can be done via extra args but this is easier. Otherwise, I would assume check-pod-template will be set to false everywhere. I think it will get the best of both worlds; fail if the mandatory properties cannot be set, at the same time it won't block on false positives.

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.

3 participants