cmattoon / aws-ssm

Populates Kubernetes Secrets from AWS Parameter Store
https://hub.docker.com/r/cmattoon/aws-ssm/
Apache License 2.0
166 stars 32 forks source link

Move apiVersion of Deployment to apps/v1 as extensions/v1beta1 is deprecated #50

Closed merkata closed 1 year ago

merkata commented 3 years ago

With k8s 1.21 the deployment apiVersion supported is apps/v1 and the extensions/v1beta1 is deprecated, thus the installation of the chart fails with:

Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"

This update fixes it and the chart can be installed.

Tested on cluster:

❯ kubectl get no -o wide NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME kind-control-plane Ready control-plane,master 52d v1.21.1 172.18.0.2 Ubuntu 21.04 5.10.25-linuxkit containerd://1.5.2

merkata commented 3 years ago

I thought gh would let me create two consecutive PRs but that didn't happen, notes to the "second" PR and functionality:

This feature introduces the option for integration testing of aws-ssm in a pipeline that has the workflow of assuming a role and injecting the credentials as chart values. With the role-arn annotation, the expectation is that you run on EC2, with this approach, any pipeline can create temporary credentials and inject them. Verified and tested on a kind cluster with a local setup.

Note that I was not certain on appVersion and version numbering, perhaps the appVersion should remain at the image tag version and the chart version to have one minor update.

Thanks for looking into this.

merkata commented 1 year ago

Closing due to lack of review.