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

Add helm values for annotations #214

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions deploy/charts/trust-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Kubernetes: `>= 1.25.0-0`
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Kubernetes Affinty; see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#affinity-v1-core |
| app.certificateAnnotations | object | `{}` | Annotations for the Certificate/Issuer resources created by trust-manager |
| app.deploymentAnnotations | object | `{}` | Annotations for the trust-manager Deployment |
| app.logLevel | int | `1` | Verbosity of trust-manager logging; takes a value from 1-5, with higher being more verbose |
| app.metrics.port | int | `9402` | Port for exposing Prometheus metrics on 0.0.0.0 on path '/metrics'. |
| app.metrics.service | object | `{"enabled":true,"servicemonitor":{"enabled":false,"interval":"10s","labels":{},"prometheusInstance":"default","scrapeTimeout":"5s"},"type":"ClusterIP"}` | Service to expose metrics endpoint. |
Expand Down
4 changes: 4 additions & 0 deletions deploy/charts/trust-manager/templates/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Issuer
metadata:
name: {{ include "trust-manager.name" . }}
namespace: {{ include "trust-manager.namespace" . }}
annotations:
{{- toYaml .Values.app.certificateAnnotations | nindent 4 }}
labels:
{{ include "trust-manager.labels" . | indent 4 }}
spec:
Expand All @@ -15,6 +17,8 @@ kind: Certificate
metadata:
name: {{ include "trust-manager.name" . }}
namespace: {{ include "trust-manager.namespace" . }}
annotations:
{{- toYaml .Values.app.certificateAnnotations | nindent 4 }}
labels:
{{ include "trust-manager.labels" . | indent 4 }}
spec:
Expand Down
2 changes: 2 additions & 0 deletions deploy/charts/trust-manager/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Deployment
metadata:
name: {{ include "trust-manager.name" . }}
namespace: {{ include "trust-manager.namespace" . }}
annotations:
{{- toYaml .Values.app.deploymentAnnotations | nindent 4 }}
labels:
{{ include "trust-manager.labels" . | indent 4 }}
spec:
Expand Down
6 changes: 6 additions & 0 deletions deploy/charts/trust-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ app:
# -- If false, disables the default seccomp profile, which might be required to run on certain platforms
seccompProfileEnabled: true

# -- Annotations for the trust-manager Deployment
deploymentAnnotations: {}

# -- Annotations for the Certificate/Issuer resources created by trust-manager
certificateAnnotations: {}
Comment on lines +114 to +115
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: Looking to the future I'd like to remove the dependency on cert-manager that trust-manager currently has. Having app.certificateAnnotations doesn't really fit with a future chart where we donn't have any certificates or issuers.

Could we move this under app.webhook.tls.certManager.annotations? That way it's clear that it's for all certManager resources (certs + issuers) and it's moved to a more specific area of the chart.


secretTargets:
# -- If set to true, enable writing trust bundles to Kubernetes Secrets as a target.
# trust-manager can only write to secrets which are explicitly allowed via either authorizedSecrets or authorizedSecretsAll.
Expand Down