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 for non-existing service account in secret validation hook #871

Conversation

omrozowicz-splunk
Copy link
Contributor

This is regarding this issue: #868

default-splunk-otel-collector-validate-secret is being run before service account is created, so every config like this:

secret:
  create: false
  name: splunk-otel-collector
serviceAccount:
  create: true
  name: splunk-collector

will result in ERROR Error: INSTALLATION FAILED: failed pre-install: warning: Hook pre-install splunk-otel-collector/templates/secret-splunk-validation-hook.yaml failed: pods "splunk-collector-splunk-otel-collector-validate-secret" is forbidden: error looking up service account splunk/splunk-collector: serviceaccount "splunk-collector" not found

We shouldn't explicitly demand having serviceAccount created beforehand either, as this is not the only way to access secrets. If the default namespace service account has access to namespace secrets and we won't put any serviceAccount in pre-hook spec, the validation will finish successfully.

@omrozowicz-splunk omrozowicz-splunk requested review from a team as code owners August 2, 2023 12:59
@jvoravong jvoravong self-requested a review August 4, 2023 00:25
@jvoravong jvoravong merged commit 44d73f4 into signalfx:main Aug 7, 2023
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