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

Bump KSM chart version to use rbac.authorization.k8s.io/v1 #194

Merged
merged 4 commits into from
Mar 16, 2021

Conversation

L3n41c
Copy link
Member

@L3n41c L3n41c commented Mar 15, 2021

What this PR does / why we need it:

Bump the version of the KSM chart.

Which issue this PR fixes

When we install the datadog chart, Helm produces the following warnings:

W0315 15:51:01.542249   64621 warnings.go:70] rbac.authorization.k8s.io/v1beta1 ClusterRole is deprecated in v1.17+, unavailable in v1.22+; use rbac.authorization.k8s.io/v1 ClusterRole
W0315 15:51:01.594559   64621 warnings.go:70] rbac.authorization.k8s.io/v1beta1 ClusterRole is deprecated in v1.17+, unavailable in v1.22+; use rbac.authorization.k8s.io/v1 ClusterRole
W0315 15:51:01.647086   64621 warnings.go:70] rbac.authorization.k8s.io/v1beta1 ClusterRole is deprecated in v1.17+, unavailable in v1.22+; use rbac.authorization.k8s.io/v1 ClusterRole
W0315 15:51:02.684250   64621 warnings.go:70] rbac.authorization.k8s.io/v1beta1 ClusterRoleBinding is deprecated in v1.17+, unavailable in v1.22+; use rbac.authorization.k8s.io/v1 ClusterRoleBinding
W0315 15:51:02.739027   64621 warnings.go:70] rbac.authorization.k8s.io/v1beta1 ClusterRoleBinding is deprecated in v1.17+, unavailable in v1.22+; use rbac.authorization.k8s.io/v1 ClusterRoleBinding
W0315 15:51:02.792100   64621 warnings.go:70] rbac.authorization.k8s.io/v1beta1 ClusterRoleBinding is deprecated in v1.17+, unavailable in v1.22+; use rbac.authorization.k8s.io/v1 ClusterRoleBinding

These errors are coming from the kube-state-metrics chart.
Whereas the datadog chart is able to automatically choose the right version of the RBAC API to use, the KSM chart switched from v1beta1 to v1 at this commit.

Special notes for your reviewer:

Whereas there is a mechanism to include or not a dependency based on a .Value.… value, I couldn’t find a way to include a dependency based on a .Capabilities.… object.

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • Documentation has been updated with helm-docs (run: .github/helm-docs.sh)
  • Chart Version bumped
  • CHANGELOG.md has beed updated
  • Variables are documented in the README.md

@L3n41c L3n41c requested a review from a team as a code owner March 15, 2021 15:37
@vboulineau
Copy link
Contributor

I've exactly the same PR locally :D. I think your requirements.lock has not been generated by Helm2 though and there are several places in the CI to update to new chart repo.

@L3n41c
Copy link
Member Author

L3n41c commented Mar 15, 2021

Indeed, my requirements.lock has been generated by Helm3. Is it an issue ?

@clamoriniere
Copy link
Collaborator

clamoriniere commented Mar 15, 2021

Indeed, my requirements.lock has been generated by Helm3. Is it an issue ?

yes because the hash is not generated the same way.

helm2 and 3 can understand hash generated by helm2.
but not the opposite

previous issue: #56

@@ -68,6 +68,8 @@ jobs:
run: helm repo add stable https://charts.helm.sh/stable && helm repo update
Copy link
Contributor

Choose a reason for hiding this comment

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

I think stable can be removed, was only used for KSM

Copy link
Contributor

Choose a reason for hiding this comment

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

Also you need to update .github/ct.yaml

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed!

@L3n41c L3n41c merged commit 8ca013e into master Mar 16, 2021
@L3n41c L3n41c deleted the lenaic/upd_ksm_rbac_v1 branch March 16, 2021 08:18
@SebastianWilhelm
Copy link

After the change of the KSM repo, that came with this PR, we can't pull images on AKS in Azure China:

Failed to pull image "k8s.gcr.io/kube-state-metrics/kube-state-metrics:v1.9.8": rpc error: code = Unknown desc = Error response from daemon: Get https://k8s.gcr.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Can we overwrite the repo for KSM in the values.yaml somehow?

@vboulineau
Copy link
Contributor

Hi @SebastianWilhelm,

Yes, you can specify a repository and tags for Kube State Metrics through:
https://github.com/kubernetes/kube-state-metrics/blob/master/charts/kube-state-metrics/values.yaml#L3-L6

In this chart values.yaml, this would be:

kube-state-metrics:
  image:
    repository: <your_repo>
    tag: v1.9.8 # If you do not use the same as upstream

@SebastianWilhelm
Copy link

Hi @SebastianWilhelm,

Yes, you can specify a repository and tags for Kube State Metrics through:
https://github.com/kubernetes/kube-state-metrics/blob/master/charts/kube-state-metrics/values.yaml#L3-L6

In this chart values.yaml, this would be:

kube-state-metrics:
  image:
    repository: <your_repo>
    tag: v1.9.8 # If you do not use the same as upstream

Ah right. That helped. Many thanks.

@L3n41c L3n41c linked an issue Mar 29, 2021 that may be closed by this pull request
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.

rbac deprecation notice when installing helm chart Use new kube-state-metrics Helm chart
4 participants