Skip to content
Draft
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
26 changes: 21 additions & 5 deletions api/v1alpha1/capoperator_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,28 @@ type CAPOperatorSpec struct {

// Common aspects for `Controller`, `SubscriptionServer` and `Webhook`
type CommonConfig struct {
// Number of replicas
Replicas *int32 `json:"replicas,omitempty"`
// Resource Requirements configuration
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
// Node selector
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// Affinity settings
Affinity *corev1.Affinity `json:"affinity,omitempty"`
// Tolerations
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
// Priority class name
PriorityClassName string `json:"priorityClassName,omitempty"`
// Topology spread constraints
TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// Pod Security context
PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
// Security context
SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
// Optionally specify list of additional volumes for the controller pod(s)
Volumes []corev1.Volume `json:"volumes,omitempty"`
// Optionally specify list of additional volumeMounts for the controller container(s)
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
}

type Webhook struct {
Expand Down Expand Up @@ -97,10 +117,6 @@ type Controller struct {
MaxConcurrentReconciles *MaxConcurrentReconciles `json:"maxConcurrentReconciles,omitempty"`
// Version monitoring configuration
VersionMonitoring *VersionMonitoring `json:"versionMonitoring,omitempty"`
// Optionally specify list of additional volumes for the controller pod(s)
Volumes []corev1.Volume `json:"volumes,omitempty"`
// Optionally specify list of additional volumeMounts for the controller container(s)
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
}

type MaxConcurrentReconciles struct {
Expand Down
75 changes: 60 additions & 15 deletions api/v1alpha1/zz_generated.deepcopy.go

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

6 changes: 6 additions & 0 deletions chart/templates/webhook-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ spec:
mountPath: /app/etc/ssl
- name: request
mountPath: /tmp
{{- with .Values.webhook.volumeMounts }}
{{- toYaml . | nindent 8 }}
{{- end }}
ports:
- name: webhook-port
containerPort: {{ .Values.webhook.service.targetPort }}
Expand All @@ -118,6 +121,9 @@ spec:
path: tls.crt
- name: request
emptyDir: {}
{{- with .Values.webhook.volumes }}
{{- toYaml . | nindent 6 }}
{{- end }}
---
apiVersion: v1
kind: Service
Expand Down
4 changes: 4 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ webhook:
port: 443
# -- Target port
targetPort: 1443
# -- Optionally specify list of additional volumes for the webhook pod(s)
volumes: []
# -- Optionally specify list of additional volumeMounts for the webhook container(s)
volumeMounts: []
# -- Certificate manager which can be either `Default` or `CertManager`
certificateManager: "Default"
# -- Optionally specify the corresponding certificate configuration
Expand Down
Loading
Loading