-
Notifications
You must be signed in to change notification settings - Fork 2k
Fix chart empty annotations in APIService #1722
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
base: master
Are you sure you want to change the base?
Fix chart empty annotations in APIService #1722
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.
Needs 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 Instructions 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. Instructions 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just set certManager.addInjectorAnnotations false? Honestly, it should not be true by default.
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 #