Skip to content

Commit

Permalink
feat: expose metrics port (#1119)
Browse files Browse the repository at this point in the history
  • Loading branch information
Suraiya-Hameed committed Apr 24, 2023
1 parent b62729a commit ea8b658
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 2 deletions.
Expand Up @@ -148,3 +148,4 @@ The following table lists the configurable parameters of the csi-secrets-store-p
| `rbac.pspEnabled` | If `true`, create and use a restricted pod security policy for Secrets Store CSI Driver AKV provider pod(s) | false |
| `constructPEMChain` | Explicitly reconstruct the pem chain in the order: SERVER, INTERMEDIATE, ROOT | `true` |
| `writeCertAndKeyInSeparateFiles` | Write cert and key in separate files. The individual files will be named as <secret-name>.crt and <secret-name>.key. These files will be created in addition to the single file. | `false` |
| `metricsAddr` | Port that serves metrics | `8898` |
Expand Up @@ -193,3 +193,6 @@ Azure:
# Arc monitoring
arc:
enableMonitoring: true

# Port that serves metrics
metricsAddr: "8898"
Expand Up @@ -25,7 +25,7 @@ spec:
{{- if .Values.enableArcExtension }}
{{- if .Values.arc.enableMonitoring }}
prometheus.io/scrape: "true"
prometheus.io/port: "8898"
prometheus.io/port: "{{ .Values.metricsAddr }}"
{{- end }}
{{- end }}
{{- end }}
Expand Down Expand Up @@ -76,6 +76,10 @@ spec:
name: arc-proxy-config
{{- end }}
{{- end }}
ports:
- containerPort: {{ .Values.metricsAddr }}
name: metrics
protocol: TCP
volumeMounts:
- name: provider-vol
mountPath: "C:\\provider"
Expand Down
Expand Up @@ -25,7 +25,7 @@ spec:
{{- if .Values.enableArcExtension }}
{{- if .Values.arc.enableMonitoring }}
prometheus.io/scrape: "true"
prometheus.io/port: "8898"
prometheus.io/port: "{{ .Values.metricsAddr }}"
{{- end }}
{{- end }}
# this will ensure pods are rolled in next helm upgrade if cert files are updated.
Expand Down Expand Up @@ -76,6 +76,10 @@ spec:
periodSeconds: 30
resources:
{{ toYaml .Values.linux.resources | indent 12 }}
ports:
- containerPort: {{ .Values.metricsAddr }}
name: metrics
protocol: TCP
securityContext:
{{- if not .Values.linux.privileged }}
allowPrivilegeEscalation: false
Expand Down
Expand Up @@ -176,3 +176,6 @@ constructPEMChain: true

# Write cert and key in separate files. The individual files will be named as <secret-name>.crt and <secret-name>.key. These files will be created in addition to the single file.
writeCertAndKeyInSeparateFiles: false

# Port that serves metrics
metricsAddr: "8898"
Expand Up @@ -46,6 +46,10 @@ spec:
limits:
cpu: 100m
memory: 200Mi
ports:
- containerPort: 8898
name: metrics
protocol: TCP
volumeMounts:
- mountPath: "C:\\provider"
name: providervol
Expand Down
4 changes: 4 additions & 0 deletions manifest_staging/deployment/provider-azure-installer.yaml
Expand Up @@ -47,6 +47,10 @@ spec:
limits:
cpu: 50m
memory: 100Mi
ports:
- containerPort: 8898
name: metrics
protocol: TCP
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
Expand Down

0 comments on commit ea8b658

Please sign in to comment.