Skip to content

Commit

Permalink
Fix cluster-auth chart (#7)
Browse files Browse the repository at this point in the history
Signed-off-by: Rokibul Hasan <[email protected]>
  • Loading branch information
RokibulHasan7 authored Feb 27, 2024
1 parent a11176b commit 5925a5e
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 2 deletions.
9 changes: 9 additions & 0 deletions apis/installer/v1alpha1/cluster_auth_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ type ClusterAuthSpec struct {
PodSecurityContext *core.PodSecurityContext `json:"podSecurityContext"`
ServiceAccount ServiceAccountSpec `json:"serviceAccount"`
Monitoring Monitoring `json:"monitoring"`
ApiServer ApiServerSpec `json:"apiServer"`
}

type ImageRef struct {
Expand All @@ -102,6 +103,14 @@ type ServiceAccountSpec struct {
Annotations map[string]string `json:"annotations"`
}

type ApiServerSpec struct {
Healthcheck HealthcheckSpec `json:"healthcheck"`
}

type HealthcheckSpec struct {
Enabled bool `json:"enabled"`
}

// +kubebuilder:validation:Enum=prometheus.io;prometheus.io/operator;prometheus.io/builtin
type MonitoringAgent string

Expand Down
32 changes: 32 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.

1 change: 1 addition & 0 deletions charts/cluster-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ The following table lists the configurable parameters of the `cluster-auth-agent
| serviceAccount.name | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | <code></code> |
| monitoring.agent | Name of monitoring agent (one of "prometheus.io", "prometheus.io/operator", "prometheus.io/builtin") | <code>prometheus.io/operator</code> |
| monitoring.serviceMonitor.labels | Specify the labels for ServiceMonitor. Prometheus crd will select ServiceMonitor using these labels. Only usable when monitoring agent is `prometheus.io/operator`. | <code>{}</code> |
| apiServer.healthcheck.enabled | | <code>true</code> |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:
Expand Down
2 changes: 1 addition & 1 deletion charts/cluster-auth/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ rules:
- operator.open-cluster-management.io
resources:
- klusterlets
verbs: ["get"]
verbs: ["get", "list", "watch"]
2 changes: 1 addition & 1 deletion charts/cluster-auth/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if .Values.apiserver.healthcheck.enabled }}
{{- if .Values.apiServer.healthcheck.enabled }}
readinessProbe:
httpGet:
path: /healthz
Expand Down
13 changes: 13 additions & 0 deletions charts/cluster-auth/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,18 @@ properties:
additionalProperties:
type: string
type: object
apiServer:
properties:
healthcheck:
properties:
enabled:
type: boolean
required:
- enabled
type: object
required:
- healthcheck
type: object
criticalAddon:
type: boolean
fullnameOverride:
Expand Down Expand Up @@ -654,6 +666,7 @@ properties:
type: object
type: array
required:
- apiServer
- image
- imagePullPolicy
- monitoring
Expand Down
3 changes: 3 additions & 0 deletions charts/cluster-auth/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@ monitoring:
# Prometheus crd will select ServiceMonitor using these labels.
# Only usable when monitoring agent is `prometheus.io/operator`.
labels: {}
apiServer:
healthcheck:
enabled: true

0 comments on commit 5925a5e

Please sign in to comment.