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

Update klipper-helm to support PodDisruptionBudget API deprecation #7184

Closed
brandond opened this issue Mar 30, 2023 · 1 comment
Closed

Update klipper-helm to support PodDisruptionBudget API deprecation #7184

brandond opened this issue Mar 30, 2023 · 1 comment
Assignees
Milestone

Comments

@brandond
Copy link
Member

brandond commented Mar 30, 2023

K3s tracking issue for:

We need to:

  1. Update the helm-mapkubeapis plugin in the klipper-helm dockerfile
  2. Tag a new release of klipper-helm
  3. Update the klipper-helm image tag in helm-controller
  4. Tag a new release of helm-controller
  5. Update the helm-controller version in go.mod and the klipper-helm image in the image list
  6. Backport/pull-through to older branches and RKE2
@ShylajaDevadiga
Copy link
Contributor

Validated on master branch using commit id 027cc18

Environment Details

Infrastructure
Cloud EC2 instance

Node(s) CPU architecture, OS, and Version:
Ubuntu 20.04

Cluster Configuration:
Single node

Steps to validate the issue

  1. Install k3s using latest commit
  2. Validate helm install, helm upgrade, helm delete of any chart to verify there is no regresssion
  3. Install and upgrade helm chart with PDB and upgrade k3s from v1.25.8 to latest commit

Results from validation:
Scenario 1: Chart without PDB

  • Install k3s from commit id from master branch
$ helm install nginx bitnami/nginx  --version 13.2.32
$ helm list
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /etc/rancher/k3s/k3s.yaml
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /etc/rancher/k3s/k3s.yaml
NAME 	NAMESPACE	REVISION	UPDATED                                	STATUS  	CHART        	APP VERSION
nginx	default  	1       	2023-04-07 02:05:31.009558401 +0000 UTC	deployed	nginx-13.2.32	1.23.4 
$ kubectl get pods
default       nginx-85d9cc5bdd-x9bxd                         1/1     Running            0              46s

$ helm upgrade nginx bitnami/nginx  --version 13.2.33
default       nginx-6495976ddd-4rbln                         1/1     Running            0               17s

$ helm list
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /etc/rancher/k3s/k3s.yaml
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /etc/rancher/k3s/k3s.yaml
NAME 	NAMESPACE	REVISION	UPDATED                                	STATUS  	CHART        	APP VERSION
nginx	default  	2       	2023-04-07 02:06:28.593077897 +0000 UTC	deployed	nginx-13.2.33	1.23.4    
$ helm delete  nginx 
$ helm list
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /etc/rancher/k3s/k3s.yaml
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /etc/rancher/k3s/k3s.yaml
NAME	NAMESPACE	REVISION	UPDATED	STATUS	CHART	APP VERSION

$ helm get manifest nginx | grep -B 5 'kind: PodDisruptionBudget' 
$ 

Scenario 2: Chart with PDB

  • Install k3s version 1.25.8
  • Install chart with PDB
  • Upgrade k3s to commit from master branch
  • Upgrade chart with PDB
$ curl -fL https://get.k3s.io| INSTALL_K3S_VERSION=v1.25.8+k3s1 sh -s - server
$ sudo chmod 644 /etc/rancher/k3s/k3s.yaml 
$ helm repo add cockroachdb https://charts.cockroachdb.com/
$ export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
$ helm install my-release cockroachdb/cockroachdb --version 10.0.6
$ helm list
NAME      	NAMESPACE	REVISION	UPDATED                                	STATUS  	CHART             	APP VERSION
my-release	default  	1       	2023-04-07 04:56:55.946147784 +0000 UTC	deployed	cockroachdb-10.0.6	22.2.6 
$ helm get manifest my-release | grep -B 2 'kind: PodDisruptionBudget'
# Source: cockroachdb/templates/poddisruptionbudget.yaml
kind: PodDisruptionBudget
$ kubectl get pods
NAME                                READY   STATUS      RESTARTS   AGE
my-release-cockroachdb-init-jtbtr   0/1     Completed   0          2m52s
my-release-cockroachdb-0            1/1     Running     0          2m52s
my-release-cockroachdb-1            1/1     Running     0          2m52s
my-release-cockroachdb-2            1/1     Running     0          2m52s
$ kubectl get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                                      STORAGECLASS   REASON   AGE
pvc-c8a0bfad-cce0-4a73-8d02-8ae81bf20b1c   100Gi      RWO            Delete           Bound    default/datadir-my-release-cockroachdb-0   local-path              2m50s
pvc-22c55cb5-86d9-490e-a84b-7970a94eca7f   100Gi      RWO            Delete           Bound    default/datadir-my-release-cockroachdb-2   local-path              2m45s
pvc-6ecfb823-9e67-4b72-ae1e-e66aff0b3c52   100Gi      RWO            Delete           Bound    default/datadir-my-release-cockroachdb-1   local-path              2m45s
$ kubectl get secrets
NAME                                   TYPE                 DATA   AGE
my-release-cockroachdb-ca-secret       Opaque               2      3m38s
my-release-cockroachdb-client-secret   kubernetes.io/tls    3      3m37s
my-release-cockroachdb-node-secret     kubernetes.io/tls    3      3m37s
sh.helm.release.v1.my-release.v1       helm.sh/release.v1   1      3m46s

Upgrade k3s and upgrade helm chart

$ curl -fL https://get.k3s.io| INSTALL_K3S_COMMIT=027cc187ce9f21157b8d37d62e67ee1c42968b4b sh -s - server
$ helm upgrade my-release cockroachdb/cockroachdb --version 10.0.7
$ helm list
NAME      	NAMESPACE	REVISION	UPDATED                                	STATUS  	CHART             	APP VERSION
my-release	default  	2       	2023-04-07 05:01:08.151224788 +0000 UTC	deployed	cockroachdb-10.0.7	22.2.7
$ kubectl get pods
NAME                                READY   STATUS        RESTARTS   AGE
my-release-cockroachdb-0            1/1     Running       0          4m37s
my-release-cockroachdb-init-n45rc   0/1     Completed     0          35s
my-release-cockroachdb-2            1/1     Running       0          29s
my-release-cockroachdb-1            1/1     Terminating   0          4m37s

$ kubectl get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                                      STORAGECLASS   REASON   AGE
pvc-d1ce1755-b19b-40ee-9dd3-e85b8d57b960   100Gi      RWO            Delete           Bound    default/datadir-my-release-cockroachdb-2   local-path              4m32s
pvc-08e7bdd0-ba43-4713-98c6-4509548b2663   100Gi      RWO            Delete           Bound    default/datadir-my-release-cockroachdb-0   local-path              4m32s
pvc-b7482823-3db7-4259-8924-4bcca321d57f   100Gi      RWO            Delete           Bound    default/datadir-my-release-cockroachdb-1   local-path              4m31s

$ kubectl get secrets
NAME                                   TYPE                 DATA   AGE
my-release-cockroachdb-ca-secret       Opaque               2      4m42s
my-release-cockroachdb-client-secret   kubernetes.io/tls    3      4m42s
my-release-cockroachdb-node-secret     kubernetes.io/tls    3      4m41s
sh.helm.release.v1.my-release.v1       helm.sh/release.v1   1      4m53s
sh.helm.release.v1.my-release.v2       helm.sh/release.v1   1      41s

$ kubectl get pods -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.containers[0].image}{"\n"}'
my-release-cockroachdb-0	cockroachdb/cockroach:v22.2.6
my-release-cockroachdb-init-n45rc	cockroachdb/cockroach:v22.2.7
my-release-cockroachdb-2	cockroachdb/cockroach:v22.2.7
my-release-cockroachdb-1	cockroachdb/cockroach:v22.2.6

@github-project-automation github-project-automation bot moved this from To Test to Done Issue in K3s Development Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants