Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use name of storageConfig in k8s PVC resource name #122

Merged
merged 4 commits into from
Jul 20, 2022

Conversation

mh013370
Copy link
Member

@mh013370 mh013370 commented Jul 19, 2022

Q A
Bug fix? no
New feature? no
API breaks? no
Deprecations? no
License Apache 2.0

What's in this PR?

Adds the PVC name specified in the NifiCluster.Spec.StorageConfigs.Name to the name of the k8s PersistentVolumeClaim so they're more easily identified. It also adds the name to the PVC metadata labels.

Additionally, I fixed a bug where the PVC generateName config didn't end in a hyphen so PVCs have a name that resembles my-nifi-1-storagew7frb instead of my-nifi-1-storage-w7frb.

With this PR, the PVC names will now look like my-nifi-1-content-repo-storage-w7frb if the NifiCluster.Spec.StorageConfigs.Name is content-repo.

Why?

To more easily identify what each persistent volume claim is used for. This is useful when building Grafana dashboards monitoring persistent volumes.

Checklist

  • Implementation tested
  • Error handling code meets the guideline
  • Logging code meets the guideline
  • User guide and development docs updated (if needed)
  • Append changelog with changes

@mh013370 mh013370 changed the title use name of storageConfig in k8s resource name use name of storageConfig in k8s PVC resource name Jul 19, 2022
Copy link
Contributor

@r65535 r65535 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@erdrix erdrix merged commit 547611d into konpyutaika:master Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants