-
-
Notifications
You must be signed in to change notification settings - Fork 6
refactor!: Split into Deployment and DaemonSet #645
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7339bee
refactor: Split into Deployment and DaemonSet
Techassi 0d3f6ad
chore: Add changelog entry
Techassi 0d64dd1
chore: Update comment
Techassi ace085e
chore: Merge branch 'main' into refactor/split-into-daemonset-and-dep…
Techassi 7677273
refactor: Adjust values.yaml file to be closer to listener-operator
Techassi 6786430
chore: Adjust changelog entry
Techassi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
deploy/helm/secret-operator/templates/controller-deployment.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: {{ include "operator.fullname" . }} | ||
| labels: | ||
| {{- include "operator.labels" . | nindent 4 }} | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| {{- include "operator.selectorLabels" . | nindent 6 }} | ||
| template: | ||
| metadata: | ||
| annotations: | ||
| internal.stackable.tech/image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
| {{- with .Values.controllerService.podAnnotations }} | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| labels: | ||
| {{- include "operator.selectorLabels" . | nindent 8 }} | ||
| spec: | ||
| {{- with .Values.image.pullSecrets }} | ||
| imagePullSecrets: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| # NOTE (@Techassi): Does it maybe make sense to have two different service accounts? | ||
| serviceAccountName: {{ include "operator.fullname" . }}-serviceaccount | ||
| securityContext: | ||
| {{- toYaml .Values.controllerService.podSecurityContext | nindent 8 }} | ||
| containers: | ||
| - name: {{ include "operator.appname" . }} | ||
| securityContext: | ||
| {{- toYaml .Values.controllerService.securityContext | nindent 12 }} | ||
| image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
| imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
| resources: | ||
| {{ .Values.controllerService.resources | toYaml | nindent 12 }} | ||
| # The arguments passed to the command being run in the container. The final command will | ||
| # look like `secret-operator run controller [OPTIONS]`. The controller needs to only run | ||
| # once in a Kubernetes cluster and as such is deployed as a Deployment with a single | ||
| # replica. | ||
| args: | ||
| - run | ||
| - controller | ||
| env: | ||
| # The following env vars are passed as clap (think CLI) arguments to the operator. | ||
| # They are picked up by clap using the structs defied in the operator. | ||
| # (which is turn pulls in https://github.com/stackabletech/operator-rs/blob/main/crates/stackable-operator/src/cli.rs) | ||
| # You can read there about the expected values and purposes. | ||
|
|
||
| # Sometimes products need to know the operator image, e.g. the opa-bundle-builder OPA | ||
| # sidecar uses the operator image. | ||
| - name: OPERATOR_IMAGE | ||
| # Tilt can use annotations as image paths, but not env variables | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.annotations['internal.stackable.tech/image'] | ||
|
|
||
| # Namespace the operator Pod is running in, e.g. used to construct the conversion | ||
| # webhook endpoint. | ||
| - name: OPERATOR_NAMESPACE | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.namespace | ||
|
|
||
| # The name of the Kubernetes Service that point to the operator Pod, e.g. used to | ||
| # construct the conversion webhook endpoint. | ||
| - name: OPERATOR_SERVICE_NAME | ||
| value: {{ include "operator.fullname" . }} | ||
|
|
||
| # Operators need to know the node name they are running on, to e.g. discover the | ||
| # Kubernetes domain name from the kubelet API. | ||
| - name: KUBERNETES_NODE_NAME | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: spec.nodeName | ||
|
|
||
| {{- if .Values.kubernetesClusterDomain }} | ||
| - name: KUBERNETES_CLUSTER_DOMAIN | ||
| value: {{ .Values.kubernetesClusterDomain | quote }} | ||
| {{- end }} | ||
| {{- include "telemetry.envVars" . | nindent 12 }} | ||
| {{- with .Values.controllerService.nodeSelector }} | ||
| nodeSelector: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.controllerService.affinity }} | ||
| affinity: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.controllerService.tolerations }} | ||
| tolerations: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.controllerService.priorityClassName }} | ||
| priorityClassName: {{ . }} | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.