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 option to inject volumes into monitoring-operator #127

Merged
merged 1 commit into from
May 9, 2024
Merged
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
4 changes: 4 additions & 0 deletions apis/installer/v1alpha1/monitoring_operator_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ type MonitoringOperatorSpec struct {
//+optional
PodAnnotations map[string]string `json:"podAnnotations"`
//+optional
Volumes []core.Volume `json:"volumes"`
//+optional
VolumeMounts []core.VolumeMount `json:"volumeMounts"`
//+optional
NodeSelector map[string]string `json:"nodeSelector"`
// If specified, the pod's tolerations.
// +optional
Expand Down
14 changes: 14 additions & 0 deletions apis/installer/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions charts/monitoring-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ The following table lists the configurable parameters of the `monitoring-operato
| logLevel | Log level for operator | <code>3</code> |
| annotations | Annotations applied to operator deployment | <code>{}</code> |
| podAnnotations | Annotations passed to operator pod(s). | <code>{}</code> |
| volumes | Additional volumes on the output Deployment definition. - name: foo secret: secretName: mysecret optional: false | <code>[]</code> |
| volumeMounts | Additional volumeMounts on the output Deployment definition. - name: foo mountPath: "/etc/foo" readOnly: true | <code>[]</code> |
| nodeSelector | Node labels for pod assignment | <code>{}</code> |
| tolerations | Tolerations for pod assignment | <code>[]</code> |
| affinity | Affinity rules for pod assignment | <code>{}</code> |
Expand Down
4 changes: 4 additions & 0 deletions charts/monitoring-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,15 @@ spec:
volumeMounts:
- mountPath: /var/serving-cert
name: serving-cert
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
volumes:
- name: serving-cert
secret:
defaultMode: 420
secretName: {{ include "monitoring-operator.fullname" . }}-apiserver-cert
{{- toYaml . | nindent 6 }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if or .Values.tolerations $criticalAddon }}
Expand Down
Loading
Loading