Skip to content

Commit

Permalink
[karavi-observability] Helm chart changes to facilitate the Karavi Ob…
Browse files Browse the repository at this point in the history
…servability 0.3.0 release (#84)
  • Loading branch information
gallacher authored Mar 26, 2021
1 parent 5b7815b commit 72bbf7a
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 110 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/charts-release-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ name: charts-release-action
# Triggers the action on push/merge to the main branch
on:
push:
branches: [ main ]
branches:
- main

jobs:
# This job will perform a helm release of all the karavi charts that have been updated
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/helm-validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ name: helm-validations
# Check runs on PRs created to merge to main branch
on:
pull_request:
branches: [ main ]
branches:
- main

jobs:
# This job will check to see if any .yaml file is modified
Expand Down
4 changes: 2 additions & 2 deletions charts/karavi-observability/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v2
appVersion: "0.2.1"
appVersion: "0.3.0"
name: karavi-observability
description: Karavi Observability is part of the [Karavi](https://github.com/dell/karavi) open source suite of Kubernetes storage enablers for Dell EMC storage products. Karavi Observability provides Kubernetes administrators with visibility into metrics and topology data related to containerized storage.
type: application
version: 0.2.1
version: 0.3.0
dependencies:
- name: cert-manager
version: 1.1.0
Expand Down
2 changes: 1 addition & 1 deletion charts/karavi-observability/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ For complete deployment instructions, refer to the [Getting Started Guide](https

## Helm Chart Versioning

For an explanation and examples on versioning the Karavi Observability Helm chart, please see the [versioning document](./VERSIONING.md).
For an explanation and examples on versioning/releasing the Karavi Observability Helm chart, please see the [contributing guide](../../docs/CONTRIBUTING.md#helm-chart-release-strategy).
40 changes: 0 additions & 40 deletions charts/karavi-observability/VERSIONING.md

This file was deleted.

1 change: 0 additions & 1 deletion charts/karavi-observability/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Karavi Metrics for PowerFlex

The Karavi Metrics for PowerFlex deployment has been successfully installed.

PowerFlex Endpoint: {{ .Values.karaviMetricsPowerflex.powerflexEndpoint }}
Provisioner Names: {{ .Values.karaviMetricsPowerflex.provisionerNames }}
Prometheus Scrape Target:
From inside the Kubernetes cluster: otel-collector:8443
57 changes: 11 additions & 46 deletions charts/karavi-observability/templates/karavi-metrics-powerflex.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
{{- $powerflexUser := required "A valid PowerFlex user is required. Refer to the Helm Chart documentation." .Values.karaviMetricsPowerflex.powerflexUser }}
{{- $powerflexPassword := required "A valid PowerFlex password is required. Refer to the Helm Chart documentation." .Values.karaviMetricsPowerflex.powerflexPassword }}
{{- $powerflexEndpoint := required "A valid PowerFlex endpoint is required. Refer to the Helm Chart documentation." .Values.karaviMetricsPowerflex.powerflexEndpoint }}

apiVersion: v1
kind: Secret
metadata:
name: powerflex-gateway-credentials
type: Opaque
data:
username: {{ $powerflexUser }}
password: {{ $powerflexPassword }}

---

apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -58,37 +43,7 @@ spec:
image: {{ .Values.karaviMetricsPowerflex.image }}
resources: {}
env:
- name: COLLECTOR_ADDR
value: {{ .Values.karaviMetricsPowerflex.collectorAddr }}
- name: POWERFLEX_ENDPOINT
value: {{ $powerflexEndpoint }}
- name: POWERFLEX_USER
valueFrom:
secretKeyRef:
name: powerflex-gateway-credentials
key: username
- name: POWERFLEX_PASSWORD
valueFrom:
secretKeyRef:
name: powerflex-gateway-credentials
key: password
- name: PROVISIONER_NAMES
value: {{ .Values.karaviMetricsPowerflex.provisionerNames }}
- name: POWERFLEX_SDC_METRICS_ENABLED
value: "{{ .Values.karaviMetricsPowerflex.sdcMetricsEnabled }}"
- name: POWERFLEX_SDC_IO_POLL_FREQUENCY
value: "{{ .Values.karaviMetricsPowerflex.sdcPollFrequencySeconds }}"
- name: POWERFLEX_VOLUME_IO_POLL_FREQUENCY
value: "{{ .Values.karaviMetricsPowerflex.volumePollFrequencySeconds }}"
- name: POWERFLEX_VOLUME_METRICS_ENABLED
value: "{{ .Values.karaviMetricsPowerflex.volumeMetricsEnabled }}"
- name: POWERFLEX_STORAGE_POOL_METRICS_ENABLED
value: "{{ .Values.karaviMetricsPowerflex.storageClassPoolMetricsEnabled }}"
- name: POWERFLEX_STORAGE_POOL_POLL_FREQUENCY
value: "{{ .Values.karaviMetricsPowerflex.storageClassPoolPollFrequencySeconds }}"
- name: POWERFLEX_MAX_CONCURRENT_QUERIES
value: "{{ .Values.karaviMetricsPowerflex.concurrentPowerflexQueries }}"
- name: POWERFLEX_METRICS_ENDPOINT
- name: POWERFLEX_METRICS_ENDPOINT
value: "{{ .Values.karaviMetricsPowerflex.endpoint }}"
- name: POWERFLEX_METRICS_NAMESPACE
valueFrom:
Expand All @@ -97,15 +52,25 @@ spec:
- name: TLS_ENABLED
value: "true"
volumeMounts:
- name: vxflexos-config
mountPath: /vxflexos-config
- name: tls-secret
mountPath: /etc/ssl/certs
readOnly: true
- name: karavi-metrics-powerflex-configmap
mountPath: /etc/config
volumes:
- name: vxflexos-config
secret:
secretName: vxflexos-config
- name: tls-secret
secret:
secretName: otel-collector-tls
items:
- key: tls.crt
path: cert.crt
- name: karavi-metrics-powerflex-configmap
configMap:
name: karavi-metrics-powerflex-configmap
restartPolicy: Always
status: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: karavi-metrics-powerflex-configmap
data:
karavi-metrics-powerflex.yaml : |
COLLECTOR_ADDR: {{ .Values.karaviMetricsPowerflex.collectorAddr }}
PROVISIONER_NAMES: {{ .Values.karaviMetricsPowerflex.provisionerNames }}
POWERFLEX_SDC_METRICS_ENABLED: "{{ .Values.karaviMetricsPowerflex.sdcMetricsEnabled }}"
POWERFLEX_SDC_IO_POLL_FREQUENCY: "{{ .Values.karaviMetricsPowerflex.sdcPollFrequencySeconds }}"
POWERFLEX_VOLUME_IO_POLL_FREQUENCY: "{{ .Values.karaviMetricsPowerflex.volumePollFrequencySeconds }}"
POWERFLEX_VOLUME_METRICS_ENABLED: "{{ .Values.karaviMetricsPowerflex.volumeMetricsEnabled }}"
POWERFLEX_STORAGE_POOL_METRICS_ENABLED: "{{ .Values.karaviMetricsPowerflex.storageClassPoolMetricsEnabled }}"
POWERFLEX_STORAGE_POOL_POLL_FREQUENCY: "{{ .Values.karaviMetricsPowerflex.storageClassPoolPollFrequencySeconds }}"
POWERFLEX_MAX_CONCURRENT_QUERIES: "{{ .Values.karaviMetricsPowerflex.concurrentPowerflexQueries }}"
---

apiVersion: v1
kind: ConfigMap
metadata:
name: karavi-topology-configmap
data:
karavi-topology.yaml: |
PROVISIONER_NAMES: {{ .Values.karaviTopology.provisionerNames }}
7 changes: 5 additions & 2 deletions charts/karavi-observability/templates/karavi-topology.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,21 @@ spec:
path: localhost.crt
- key: tls.key
path: localhost.key
- name: karavi-topology-configmap
configMap:
name: karavi-topology-configmap
serviceAccount: {{ .Release.Name }}-topology-controller
containers:
- name: karavi-topology
image: {{ .Values.karaviTopology.image }}
resources: {}
env:
- name: PROVISIONER_NAMES
value: {{ .Values.karaviTopology.provisionerNames }}
- name: PORT
value: "8443"
volumeMounts:
- name: karavi-topology-secret-volume
mountPath: "/certs"
- name: karavi-topology-configmap
mountPath: "/etc/config"
restartPolicy: Always
status: {}
13 changes: 4 additions & 9 deletions charts/karavi-observability/values.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
karaviTopology:
image: dellemc/karavi-topology:0.2.0-pre-release
image: dellemc/csm-topology:v0.3.0
# comma separated list of provisioner names (ex: csi-vxflexos.dellemc.com)
provisionerNames: csi-vxflexos.dellemc.com
service:
type: ClusterIP

karaviMetricsPowerflex:
powerflexEndpoint:
# base64 user and password
powerflexUser:
powerflexPassword:

image: dellemc/karavi-metrics-powerflex:0.2.0-pre-release
image: dellemc/csm-metrics-powerflex:v0.3.0
collectorAddr: otel-collector:55680
# comma separated list of provisioner names (ex: csi-vxflexos.dellemc.com)
provisionerNames: csi-vxflexos.dellemc.com
# set sdcMetricsEnabled to "false" to disable collection of SDC metrics
sdc_metricsEnabled: "true"
sdcMetricsEnabled: "true"
# set polling frequency to the PowerFlex array to get metrics data
sdcPollFrequencySeconds: 10
volumePollFrequencySeconds: 10
Expand All @@ -38,4 +33,4 @@ otelCollector:
service:
type: ClusterIP
nginxProxy:
image: nginx:1
image: nginxinc/nginx-unprivileged:1.18
38 changes: 31 additions & 7 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Become one of the contributors to this project! We thrive to build a welcoming a
- [Pull requests](#pull-requests)
- [Code Reviews](#code-reviews)
- [Code Quality](#code-quality)
- [Helm chart release strategy](#helm-chart-release-strategy)

## Become a contributor

Expand Down Expand Up @@ -94,22 +95,21 @@ When you're ready to contribute, it's time to create a pull request.

## Branching Strategy

We are following a scaled trunk branching strategy where short-lived branches are created off of the main branch. When coding is complete, the branch is merged back into main after being approved in a pull request code review.
Updating a Helm chart will require a new branch. When updates are complete, the branch is merged back into the main branch after being approved in a pull request review. The frequency in which you merge branches into the main branch depends on how often you wish to release the Helm chart. Please see [Helm chart branching strategy](#helm-chart-release-strategy) for information on how merging a branch to the main branch will automatically release a Helm chart.

### Branch Naming Convention

Branch naming should be descriptive and align with a feature or bug fix. In order to align a branch with the feature or bug fix, use the GitHub issue ID whenever possible.

| Branch Type | Example | Comment |
| ----------- | -------------------------------- | ---------------------------------------- |
| main | main | |
| Release | release-1.0 | hotfix: release-1.1 patch: release-1.0.1 |
| Feature | feature-9-olp-support | "9" referring to GitHub issue ID |
| Bug Fix | bugfix-110-remove-docker-compose | "110" referring to GitHub issue ID |

### Branch Types

- A Release branch is a branch created from the main branch used for releasing a Helm Chart version. Only critical bug fixes will be merged into this branch.
- Bug Fix branch is a branch which is created for the purpose of fixing the given defect/issue.
- Feature branch is created for a feature development purpose.
- Feature branch is created for feature development

### Steps to create a branch for a bug fix or feature

Expand All @@ -120,8 +120,6 @@ We are following a scaled trunk branching strategy where short-lived branches ar
5. Open a [pull request](#pull-requests) between your branch and the upstream main branch.
6. Once your pull request has merged, your branch can be deleted.

Release branches will be created from the main branch near the time of a planned release when all features are completed. Only critical bug fixes will be merged into the release branch at this time. All other bug fixes and features can continue to be merged into the main branch. When the release branch is stable, the branch will be tagged for release.

## Signing your commits

We require that developers sign off their commits to certify that they have permission to contribute the code in a pull request. This way of certifying is commonly known as the [Developer Certificate of Origin (DCO)](https://developercertificate.org/). We encourage all contributors to read the DCO text before signing a commit and making contributions.
Expand Down Expand Up @@ -191,3 +189,29 @@ A pull request must satisfy following for it to be merged:
- Maintainer must perform a code review and ensure there is no malicious code.
- Maintainer must run a suite of tests that verify the quality of the code being submitted, and update the contributor if there are any failures.
- If any commits are made after the PR has been approved, the PR approval will automatically be removed and the above process must happen again.

## Helm chart release strategy

It is important to understand that when a branch is merged into the main branch, a GitHub action will generate a new helm chart release if the helm chart version in the chart.yaml file has been incremented. Consider the following example where a change to the Helm chart has been made and the contributor wants a new version to be released:

The original Chart.yaml file:

```yaml
apiVersion: v2
name: karavi-observability
description: A Helm chart for Kubernetes
type: application
version: 0.1.0
```
If a modification to the Helm chart is made (an update to the values.yaml file for instance) the version in Chart.yaml is incremented to `0.2.0`:

```yaml
apiVersion: v2
name: karavi-observability
description: A Helm chart for Kubernetes
type: application
version: 0.2.0 # version updates to 0.2.0
```

Once the associated branch is merged into the main branch, the GitHub action packages and publishes an artifact, making it available for consumption. The release name is based off the 'name' field and the 'version' field in the Chart.yaml file. Given the example above, GitHub action will produce a release called `karavi-observability-0.2.0`.

0 comments on commit 72bbf7a

Please sign in to comment.