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

feat(podAnnotations): individualized Pod Annotations #222

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

andrewazores
Copy link
Member

Related to #220

To test:

  1. ex. helm install --set-json 'podAnnotations={"foo":"bar","com.example/annotation":"hello"}' --set-json 'storage.podAnnotations={"alice":"bob"}' cryostat ./charts/cryostat
  2. Wait for chart to deploy
  3. Verify annotations are set:
$ oc get -o jsonpath='{.spec.template.metadata.annotations}' deployments/cryostat-v4-storage | jq
{
  "alice": "bob",
  "com.example/annotation": "hello",
  "foo": "bar"
}
$ oc get -o jsonpath='{.spec.template.metadata.annotations}' deployments/cryostat-v4 | jq
{
  "com.example/annotation": "hello",
  "foo": "bar"
}
  1. Try to install with conflicting annotations: helm install --set-json 'podAnnotations={"foo":"bar"}' --set-json 'core.podAnnotations={"foo":"baz"}' cryostat ./charts/cryostat
  2. Verify that the installation preferred the pod-specific annotation:
$ oc get -o jsonpath='{.spec.template.metadata.annotations}' deployments/cryostat-v4 | jq
{
  "foo": "baz"
}

@andrewazores andrewazores added feat New feature or request safe-to-test labels Nov 29, 2024
@andrewazores andrewazores requested a review from a team November 29, 2024 18:33
@@ -351,7 +363,7 @@ serviceAccount:
## @param serviceAccount.name The name of the service account to use. If not set and create is true, a name is generated using the fullname template
name: ""

## @param podAnnotations [object] Annotations to be applied to the Cryostat Pod
## @param podAnnotations [object] Annotations to be applied to the various Pods
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be clearer to say "Common annotations that applied to all managed Pods"?

@@ -199,6 +207,8 @@ grafana:
pullPolicy: Always
## @param grafana.image.tag Tag for the Grafana container image
tag: "latest"
## @param grafana.podAnnotations [object] Annotations to be applied to the Grafana Pods
podAnnotations: {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are unused right? Grafana and Datasource are in the same pod as Cryostat.

@@ -229,6 +239,8 @@ datasource:
pullPolicy: Always
## @param datasource.image.tag Tag for the JFR Data Source container image
tag: "latest"
## @param datasource.podAnnotations [object] Annotations to be applied to the JFR Datasource Pods
podAnnotations: {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request safe-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants