Skip to content

Commit

Permalink
add support for csm-metrics-powerscale
Browse files Browse the repository at this point in the history
Add powerscale configuration to support csm-metrics-powerscale:
  - Add karavi-metrics-powerscale.yaml, karavi-metrics-powerscale.yaml;
  - Add pscale configuration to karavi-observability-configmap.yaml,
  values.yaml, cert-manager.yaml and NOTES.txt;
  - Rollback otel-collecter and nginxProxy image version to 0.42.0 and
  1.20;
  - Rollback tls settings for otel in otel-collector-config.yaml.
  • Loading branch information
taohe1012 committed Jul 5, 2022
1 parent 638be42 commit 3e6900a
Show file tree
Hide file tree
Showing 6 changed files with 195 additions and 3 deletions.
3 changes: 2 additions & 1 deletion charts/karavi-observability/otel-collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ receivers:
otlp:
protocols:
grpc:
tls_settings:
endpoint: 0.0.0.0:55680
tls:
cert_file: /etc/ssl/certs/tls.crt
key_file: /etc/ssl/certs/tls.key

Expand Down
12 changes: 12 additions & 0 deletions charts/karavi-observability/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,15 @@ CSM Metrics for PowerStore
From inside the Kubernetes cluster: otel-collector:8443

{{- end}}

{{ if .Values.karaviMetricsPowerscale.enabled -}}

CSM Metrics for PowerScale

The CSM Metrics for PowerScale deployment has been successfully installed.

Provisioner Names: {{ .Values.karaviMetricsPowerscale.provisionerNames }}
Prometheus Scrape Target:
From inside the Kubernetes cluster: otel-collector:8443

{{- end}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{{ if .Values.karaviMetricsPowerscale.enabled }}

apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Release.Name }}-metrics-powerscale-controller
namespace: {{ .Release.Namespace }}

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ .Release.Name }}-metrics-powerscale-controller
rules:
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes", "storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["persistentvolumes", "nodes"]
verbs: ["list"]
- apiGroups: [""]
resources: ["endpoints"]
verbs: ["*"]

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ .Release.Name }}-metrics-powerscale-controller
subjects:
- kind: ServiceAccount
name: {{ .Release.Name }}-metrics-powerscale-controller
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ .Release.Name }}-metrics-powerscale-controller
apiGroup: rbac.authorization.k8s.io

{{ end }}

Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{{ if .Values.karaviMetricsPowerscale.enabled }}

apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/name: karavi-metrics-powerscale
app.kubernetes.io/instance: {{ .Release.Name }}
name: karavi-metrics-powerscale
spec:
type: {{ .Values.karaviMetricsPowerscale.service.type }}
ports:
- name: karavi-metrics-powerscale
port: 8080
targetPort: 8080
selector:
app.kubernetes.io/name: karavi-metrics-powerscale
app.kubernetes.io/instance: {{ .Release.Name }}

---

apiVersion: apps/v1
kind: Deployment
metadata:
name: karavi-metrics-powerscale
labels:
app.kubernetes.io/name: karavi-metrics-powerscale
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: karavi-metrics-powerscale
app.kubernetes.io/instance: {{ .Release.Name }}
replicas: 1
strategy: {}
template:
metadata:
labels:
app.kubernetes.io/name: karavi-metrics-powerscale
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
serviceAccount: {{ .Release.Name }}-metrics-powerscale-controller
containers:
- name: karavi-metrics-powerscale
image: {{ .Values.karaviMetricsPowerscale.image }}
resources: {}
env:
- name: POWERSCALE_METRICS_ENDPOINT
value: "{{ .Values.karaviMetricsPowerscale.endpoint }}"
- name: POWERSCALE_METRICS_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: TLS_ENABLED
value: "true"
volumeMounts:
- name: isilon-creds
mountPath: /isilon-creds
- name: tls-secret
mountPath: /etc/ssl/certs
readOnly: true
- name: karavi-metrics-powerscale-configmap
mountPath: /etc/config
volumes:
- name: isilon-creds
secret:
secretName: isilon-creds
- name: tls-secret
secret:
secretName: otel-collector-tls
items:
- key: tls.crt
path: cert.crt
- name: karavi-metrics-powerscale-configmap
configMap:
name: karavi-metrics-powerscale-configmap
restartPolicy: Always
status: {}

{{ end }}

Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,26 @@ data:
{{ end }}

---

{{ if .Values.karaviMetricsPowerscale.enabled }}

apiVersion: v1
kind: ConfigMap
metadata:
name: karavi-metrics-powerscale-configmap
data:
karavi-metrics-powerscale.yaml : |
COLLECTOR_ADDR: {{ .Values.karaviMetricsPowerscale.collectorAddr }}
PROVISIONER_NAMES: {{ .Values.karaviMetricsPowerscale.provisionerNames }}
POWERSCALE_VOLUME_IO_POLL_FREQUENCY: "{{ .Values.karaviMetricsPowerscale.volumePollFrequencySeconds }}"
POWERSCALE_VOLUME_METRICS_ENABLED: "{{ .Values.karaviMetricsPowerscale.volumeMetricsEnabled }}"
POWERSCALE_MAX_CONCURRENT_QUERIES: "{{ .Values.karaviMetricsPowerscale.concurrentPowerscaleQueries }}"
POWERSCALE_CLUSTER_POLL_FREQUENCY: "{{ .Values.karaviMetricsPowerscale.clusterPollFrequencySeconds }}"
POWERSCALE_ISICLIENT_INSECURE: "{{ .Values.karaviMetricsPowerscale.isiClientOptions.isiSkipCertificateValidation }}"
POWERSCALE_ISICLIENT_AUTH_TYPE: "{{ .Values.karaviMetricsPowerscale.isiClientOptions.isiAuthType }}"
POWERSCALE_ISICLIENT_VERBOSE: "{{ .Values.karaviMetricsPowerscale.isiClientOptions.isiLogVerbose }}"
LOG_LEVEL: "{{ .Values.karaviMetricsPowerscale.logLevel }}"
LOG_FORMAT: "{{ .Values.karaviMetricsPowerscale.logFormat }}"
{{ end }}
37 changes: 35 additions & 2 deletions charts/karavi-observability/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,45 @@ karaviMetricsPowerstore:
serviceName: metrics-powerstore
probability: 0.0

karaviMetricsPowerscale:
image: dellemc/csm-metrics-powerscale:nightly
enabled: true
collectorAddr: otel-collector:55680
# comma separated list of provisioner names (ex: csi-isilon.dellemc.com)
provisionerNames: csi-isilon.dellemc.com
# set polling frequency to the PowerScale cluster to get metrics data
volumePollFrequencySeconds: 20
clusterPollFrequencySeconds: 30
# set volumeMetricsEnabled to "false" to disable collection of Volume metrics
volumeMetricsEnabled: "true"
# set clusterMetricsEnabled to "false" to disable collection of Cluster metrics
clusterMetricsEnabled: "true"
# set the the default max concurrent queries to PowerScale
concurrentPowerscaleQueries: 10
# set the default endpoint for PowerScale service
endpoint: karavi-metrics-powerscale
service:
type: ClusterIP
logLevel: INFO
logFormat: text
# isiClientOptions to access Powerscale OneFS API server
isiClientOptions:
# set isiSkipCertificateValidation to true/false to skip/verify OneFS API server's certificates
# default isiSkipCertificateValidation: true to skip OneFS API server's certificates
isiSkipCertificateValidation: true
# set isiAuthType to 0/1 to enables session-based/basic Authentication
# default isiAuthType: 0 to use session-based Authentication
isiAuthType: 1
# set isiLogVerbose to 0/1/2 decide High/Medium/Low content of the OneFS REST API message should be logged in debug level logs
# default isiLogVerbose: 0 to log full content of the HTTP request and response
isiLogVerbose: 0

otelCollector:
image: otel/opentelemetry-collector:0.9.0
image: otel/opentelemetry-collector:0.42.0
service:
type: ClusterIP
nginxProxy:
image: nginxinc/nginx-unprivileged:1.18
image: nginxinc/nginx-unprivileged:1.20

cert-manager:
startupapicheck:
Expand Down

0 comments on commit 3e6900a

Please sign in to comment.