Fix chart empty annotations in APIService#1722
Fix chart empty annotations in APIService#1722danielllek wants to merge 1 commit intokubernetes-sigs:masterfrom
Conversation
Latest chart version adds empty (null) `annotations` to APIService object.
This causes problem (constant diff) when metrics servers is deployed from ArgoCD using helm chart.
What causes this:
1. helm template produces such yaml
```yaml
---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1beta1.metrics.k8s.io
labels:
helm.sh/chart: metrics-server-3.13.0
app.kubernetes.io/name: metrics-server
app.kubernetes.io/instance: test
app.kubernetes.io/version: "0.8.0"
app.kubernetes.io/managed-by: Helm
spec:
group: metrics.k8s.io
groupPriorityMinimum: 100
insecureSkipTLSVerify: true
service:
name: test-metrics-server
namespace: default
port: 443
version: v1beta1
versionPriority: 100
```
1. After applying this yaml to Kubernetes, api server removes empty `annotations:`
1. ArgoCD sees diff and tries to apply again and cycle repeats.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: danielllek The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
The committers listed above are authorized under a signed CLA. |
|
This issue is currently awaiting triage. If metrics-server contributors determine this is a relevant issue, they will accept it by applying the The DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Welcome @danielllek! |
|
Hi @danielllek. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
| labels: | ||
| {{- include "metrics-server.labels" . | nindent 4 }} | ||
| {{- if or .Values.apiService.annotations .Values.tls.certManager.addInjectorAnnotations }} | ||
| {{- if or .Values.apiService.annotations (and .Values.tls.certManager.addInjectorAnnotations (eq .Values.tls.type "cert-manager")) }} |
There was a problem hiding this comment.
Why not just set certManager.addInjectorAnnotations false? Honestly, it should not be true by default.
There was a problem hiding this comment.
I think if Cert Manager is enabled the annotation pattern is the desired default, but I'd have to check the implementation to be certain.
|
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
What this PR does / why we need it:
Latest chart version adds empty (null)
annotationsto APIService object.This causes problem (constant diff) when metrics servers is deployed from ArgoCD using helm chart.
What causes this:
annotations:Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #