Skip to content

Commit

Permalink
Update terminology: Rename annotation `serviceNameOverrideAnnotationN…
Browse files Browse the repository at this point in the history
…ame` to `workloadNameOverrideAnnotationName`, retaining support for backward compatibility (#270)

Co-authored-by: Amit Lichtenberg <amitlicht@gmail.com>
  • Loading branch information
omris94 and amitlicht authored Jan 19, 2025
1 parent e6bfabc commit 2fd8477
Show file tree
Hide file tree
Showing 13 changed files with 110 additions and 85 deletions.
44 changes: 22 additions & 22 deletions credentials-operator/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,11 @@ spec:
key: otterize-cloud-client-secret
{{ end }}
{{ if .Values.global.serviceNameOverrideAnnotationName }}
- name: OTTERIZE_SERVICE_NAME_OVERRIDE_ANNOTATION
- name: OTTERIZE_WORKLOAD_NAME_OVERRIDE_ANNOTATION
value: {{ .Values.global.serviceNameOverrideAnnotationName | quote }}
{{ else if .Values.global.workloadNameOverrideAnnotationName }}
- name: OTTERIZE_WORKLOAD_NAME_OVERRIDE_ANNOTATION
value: {{ .Values.global.workloadNameOverrideAnnotationName | quote }}
{{ end }}
{{ if .Values.global.otterizeCloud.apiExtraCAPEMSecret }}
- name: OTTERIZE_API_EXTRA_CA_PEM
Expand Down
6 changes: 4 additions & 2 deletions credentials-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ global:
enabled: false


# Specify an annotation name that by setting it, one can override otterize's service name resolution.
serviceNameOverrideAnnotationName: intents.otterize.com/service-name
# Specify an annotation name that by setting it, one can override otterize's workload name resolution.
workloadNameOverrideAnnotationName: intents.otterize.com/workload-name
# DEPRECATED: use `workloadNameOverrideAnnotationName` instead
serviceNameOverrideAnnotationName:

openshift: false

Expand Down
38 changes: 19 additions & 19 deletions intents-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

## Global parameters

| Key | Description | Default |
|-------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|
| `global.allowGetAllResources` | If defined overrides `allowGetAllResources`. | |
| `global.telemetry.enabled` | If set to `false`, all anonymous telemetries collection will be disabled | `true` |
| `global.telemetry.usage.enabled` | If set to `false`, collection of anonymous telemetries on product usage will be disabled | `true` |
| `global.telemetry.errors.enabled` | If set to `false`, collection of anonymous telemetries on application crashes and errors will be disabled | `true` |
| `global.telemetry.errors.endpointAddress` | If set, overrides the default endpoint address for anonymous telemetries on application crashes and errors | `(none)` |
| `global.telemetry.errors.stage` | If set, overrides the default stage for anonymous telemetries on application crashes and errors | `(none)` |
| `global.telemetry.errors.intentsOperatorApiKey` | If set, overrides the default API key for anonymous telemetries on application crashes and errors | `(none)` |
| `global.commonAnnotations` | Annotations to add to all deployed objects | {} |
| `global.commonLabels` | Labels to add to all deployed objects | {} |
| `global.podAnnotations` | Annotations to add to all deployed pods | {} |
| `global.podLabels` | Labels to add to all deployed pods | {} |
| `global.serviceNameOverrideAnnotationName` | Which annotation to use (in the [service name resolution algorithm](https://docs.otterize.com/reference/service-identities#kubernetes-service-identity-resolution)) for setting a pod's service name, if not the default. Use this if you already have annotations on your pods that provide the correct service name. | `intents.otterize.com/service-name` |
| `global.aws.enabled` | Enable or disable AWS integration | `false` |
| `global.aws.eksClusterNameOverride` | EKS cluster name (overrides auto-detection) | `(none)` |
| `global.azure.enabled` | Enable or disable Azure integration | `false` |
| `global.gcp.enabled` | Enable or disable GCP integration | `false` |
| `global.openshift` | Whether to configure and deploy SecurityContextConstraints that allow all components to run with minimal privileges on a default OpenShift installation. | `false` |
| Key | Description | Default |
|-------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------|
| `global.allowGetAllResources` | If defined overrides `allowGetAllResources`. | |
| `global.telemetry.enabled` | If set to `false`, all anonymous telemetries collection will be disabled | `true` |
| `global.telemetry.usage.enabled` | If set to `false`, collection of anonymous telemetries on product usage will be disabled | `true` |
| `global.telemetry.errors.enabled` | If set to `false`, collection of anonymous telemetries on application crashes and errors will be disabled | `true` |
| `global.telemetry.errors.endpointAddress` | If set, overrides the default endpoint address for anonymous telemetries on application crashes and errors | `(none)` |
| `global.telemetry.errors.stage` | If set, overrides the default stage for anonymous telemetries on application crashes and errors | `(none)` |
| `global.telemetry.errors.intentsOperatorApiKey` | If set, overrides the default API key for anonymous telemetries on application crashes and errors | `(none)` |
| `global.commonAnnotations` | Annotations to add to all deployed objects | {} |
| `global.commonLabels` | Labels to add to all deployed objects | {} |
| `global.podAnnotations` | Annotations to add to all deployed pods | {} |
| `global.podLabels` | Labels to add to all deployed pods | {} |
| `global.workloadNameOverrideAnnotationName` | Which annotation to use (in the [service name resolution algorithm](https://docs.otterize.com/reference/service-identities#kubernetes-service-identity-resolution)) for setting a pod's service name, if not the default. Use this if you already have annotations on your pods that provide the correct workload name. | `intents.otterize.com/workload-name` |
| `global.aws.enabled` | Enable or disable AWS integration | `false` |
| `global.aws.eksClusterNameOverride` | EKS cluster name (overrides auto-detection) | `(none)` |
| `global.azure.enabled` | Enable or disable Azure integration | `false` |
| `global.gcp.enabled` | Enable or disable GCP integration | `false` |
| `global.openshift` | Whether to configure and deploy SecurityContextConstraints that allow all components to run with minimal privileges on a default OpenShift installation. | `false` |

## Operator parameters

Expand Down
7 changes: 5 additions & 2 deletions intents-operator/templates/intents-operator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
intents.otterize.com/service-name: intents-operator
intents.otterize.com/workload-name: intents-operator
checksum/config: {{ include (print $.Template.BasePath "/extended-config-configmap.yaml") . | sha256sum }}
{{ if and (.Values.operator.autoGenerateTLSUsingCredentialsOperator) (.Values.global.certificateProvider) }}
credentials-operator.otterize.com/tls-secret-name: intents-operator-spire-tls-controller-manager
Expand Down Expand Up @@ -145,8 +145,11 @@ spec:
value: {{ template "otterize.operator.apiExtraCAPEM" }}
{{ end }}
{{ if .Values.global.serviceNameOverrideAnnotationName }}
- name: OTTERIZE_SERVICE_NAME_OVERRIDE_ANNOTATION
- name: OTTERIZE_WORKLOAD_NAME_OVERRIDE_ANNOTATION
value: {{ .Values.global.serviceNameOverrideAnnotationName | quote }}
{{ else if .Values.global.workloadNameOverrideAnnotationName }}
- name: OTTERIZE_WORKLOAD_NAME_OVERRIDE_ANNOTATION
value: {{ .Values.global.workloadNameOverrideAnnotationName | quote }}
{{ end }}
- name: OTTERIZE_ENABLE_AWS_IAM_POLICY
value: {{ .Values.global.aws.enabled | quote }}
Expand Down
8 changes: 6 additions & 2 deletions intents-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,12 @@ global:
# Annotations to add to all deployed objects
commonAnnotations: {}

# Specify an annotation name that by setting it, one can override otterize's service name resolution.
serviceNameOverrideAnnotationName: intents.otterize.com/service-name
# Specify an annotation name that by setting it, one can override otterize's workload name resolution.
workloadNameOverrideAnnotationName: intents.otterize.com/workload-name

# DEPRECATED: use `workloadNameOverrideAnnotationName` instead
serviceNameOverrideAnnotationName:

experimentalUseDockerImageAsServiceNameForJobs: false

openshift: false
Expand Down
Loading

0 comments on commit 2fd8477

Please sign in to comment.