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

Ignore duplicate strings in the fullname helper template #156

Merged
merged 3 commits into from
Dec 28, 2023

Conversation

den-is
Copy link
Contributor

@den-is den-is commented Dec 28, 2023

Why is this pull request needed and what does it do?

Current chart was setting not smart names for all object it was creating.
Specifically if release name equals chart name - in this case coredns - release name should be ignored, to avoid duplicates in the name.

  • Before the fix: names with coredns-coredns string in them.
kubectl -n kube-system get all,sa,clusterrole,clusterrolebinding,smon -l app.kubernetes.io/instance=coredns
NAME                                   READY   STATUS    RESTARTS      AGE
pod/coredns-coredns-6db9976d78-drpdc   1/1     Running   1 (11h ago)   15h

NAME                              TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)         AGE
service/coredns-coredns-metrics   ClusterIP   10.30.232.118   <none>        9153/TCP        15h
service/kube-dns                  ClusterIP   10.30.0.10      <none>        53/UDP,53/TCP   15h

NAME                              READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/coredns-coredns   1/1     1            1           15h

NAME                                         DESIRED   CURRENT   READY   AGE
replicaset.apps/coredns-coredns-6db9976d78   1         1         1       15h

NAME                             SECRETS   AGE
serviceaccount/coredns-coredns   0         15h

NAME                                                    CREATED AT
clusterrole.rbac.authorization.k8s.io/coredns-coredns   2023-12-27T13:55:55Z

NAME                                                           ROLE                          AGE
clusterrolebinding.rbac.authorization.k8s.io/coredns-coredns   ClusterRole/coredns-coredns   15h

NAME                                                   AGE
servicemonitor.monitoring.coreos.com/coredns-coredns   15h
  • After the fix: clean names when helm release is named coredns
kubectl -n kube-system get all,sa,clusterrole,clusterrolebinding,smon -l app.kubernetes.io/instance=coredns
NAME                           READY   STATUS    RESTARTS   AGE
pod/coredns-7545f4d965-sm4wt   1/1     Running   0          55s

NAME                      TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)         AGE
service/coredns           ClusterIP   10.30.0.10     <none>        53/UDP,53/TCP   56s
service/coredns-metrics   ClusterIP   10.30.10.176   <none>        9153/TCP        56s

NAME                      READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/coredns   1/1     1            1           56s

NAME                                 DESIRED   CURRENT   READY   AGE
replicaset.apps/coredns-7545f4d965   1         1         1       56s

NAME                     SECRETS   AGE
serviceaccount/coredns   0         56s

NAME                                            CREATED AT
clusterrole.rbac.authorization.k8s.io/coredns   2023-12-28T05:58:55Z

NAME                                                   ROLE                  AGE
clusterrolebinding.rbac.authorization.k8s.io/coredns   ClusterRole/coredns   56s

NAME                                           AGE
servicemonitor.monitoring.coreos.com/coredns   56s

Extra additional change:
Removed deprecated "engine: gotpl" from the Chart.yaml, that was caught by my linter.
Screen Shot 2023-12-28 at 10 33 57

Which issues (if any) are related?

Fixes #155

Checklist:

  • I have bumped the chart version according to versioning.
  • I have updated the chart changelog with all the changes that come with this pull request according to changelog.
  • Any new values are backwards compatible and/or have sensible default.
  • I have signed off all my commits as required by DCO.

Changes are automatically published when merged to main. They are not published on branches.

Note on DCO

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Signed-off-by: Denis Iskandarov <d.iskandarov@gmail.com>
Signed-off-by: Denis Iskandarov <d.iskandarov@gmail.com>
Signed-off-by: Denis Iskandarov <d.iskandarov@gmail.com>
@hagaibarel hagaibarel self-assigned this Dec 28, 2023
@hagaibarel hagaibarel merged commit 2ebfb3a into coredns:master Dec 28, 2023
2 checks passed
brandond added a commit to brandond/rke2-charts that referenced this pull request Feb 21, 2024
Ref: coredns/helm#156
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to rancher/rke2-charts that referenced this pull request Feb 21, 2024
Ref: coredns/helm#156
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
github-actions bot pushed a commit to rancher/rke2-charts that referenced this pull request Feb 21, 2024
Ref: coredns/helm#156
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
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.

fullname template is not ignoring duplicate coredns string in it
2 participants