Skip to content

Conversation

@plaffitt
Copy link
Contributor

@plaffitt plaffitt commented Feb 3, 2023

This PR tries to harmonize naming between helm resources and fix some naming issues as well.

  1. Registry statefulset was originally named "cache-registry" at the time the project was also called "cache-registry". Thus, when reworking the chart, its name was replaced by a template to name it by the name of the project. Then, when the project was renamed kube-image-keeper, the registry name was templated as kube-image-keeper instead of cache-registry. This commit intend to fix this mistake and set a proper name for the registry.
  2. All resources are now prefixed with the kube-image-keeper.fullname helper, which by default when following the installation steps in the readme is kuik. It still can be customized using values nameOverride and fullnameOverride or by giving another name than the standard one (kube-image-keeper) to the helm release. It follows those rules (see test-helm-fullname-helper.sh file for examples) :
    • Fullname = releaseName-name
    • By default, name = "kuik" but it can be overridden by specifying nameOverride value
    • If the release is named "kube-image-keeper", then it is shortened as "kuik" in the fullname
    • If releaseName contains name it will be used as a full name to avoid repetition.
    • The fullname can be completely overridden by specifying fullnameOverride value

⚠️ The renaming create a new PVC for the registry, thus invalidate the cache.

@plaffitt plaffitt force-pushed the fix/registry-name branch 4 times, most recently from 76d2a3c to 5898b00 Compare February 7, 2023 15:56
It was originally named "cache-registry" at the time the project was also called "cache-registry". Thus, when reworking the chart, its name was replaced by a template to name it by the name of the project. Then, when the project was renamed kube-image-keeper, the registry name was templated as kube-image-keeper instead of cache-registry. This commit intend to fix this mistake and set a proper name for the registry.
cjob
@plaffitt plaffitt changed the title fix(helm): rename registry statefulset Rename helm resources Feb 7, 2023
@jpetazzo
Copy link
Member

jpetazzo commented Feb 7, 2023

I like it!

$ helm template kube-image-keeper helm/kube-image-keeper/ | grep -e '^  name:' -e ^kind
kind: ServiceAccount
  name: kuik-registry-restart
kind: ServiceAccount
  name: kuik-controllers
kind: CustomResourceDefinition
  name: cachedimages.kuik.enix.io
kind: ClusterRole
  name: kuik-controllers
kind: ClusterRole
  name: kuik-controllers-leader-election
kind: ClusterRoleBinding
  name: kuik-controllers
  name: kuik-controllers
kind: ClusterRoleBinding
  name: kuik-controllers-leader-election
  name: kuik-controllers-leader-election
kind: Role
  name: kuik-registry-restart
kind: RoleBinding
  name: kuik-registry-restart
  name: kuik-registry-restart
kind: Service
  name: kuik-registry
kind: Service
  name: kuik-webhook
kind: DaemonSet
  name: kuik-proxy
kind: Deployment
  name: kuik-controllers
kind: StatefulSet
  name: kuik-registry
kind: Certificate
  name: kuik-serving-cert
kind: Issuer
  name: kuik-selfsigned-issuer
kind: MutatingWebhookConfiguration
  name: kuik-mutating-webhook
  name: mpod.kb.io

SGTM 💯

@plaffitt plaffitt merged commit 2cf7250 into main Feb 9, 2023
@plaffitt plaffitt deleted the fix/registry-name branch February 9, 2023 13:37
@monkeynator
Copy link
Member

🎉 This PR is included in version 1.1.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@monkeynator
Copy link
Member

🎉 This PR is included in version 1.1.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

4 similar comments
@monkeynator
Copy link
Member

🎉 This PR is included in version 1.1.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@monkeynator
Copy link
Member

🎉 This PR is included in version 1.1.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@monkeynator
Copy link
Member

🎉 This PR is included in version 1.1.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@monkeynator
Copy link
Member

🎉 This PR is included in version 1.1.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@monkeynator
Copy link
Member

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants