aws-iam-authenticator introduced the possibility to use custom resources to configure roles and user bindings. However, this version of the app was not available in EKS. So here is an operator to reflect IamIdentityMappings changes in the aws-auth configmap.
2024 update: Amazon EKS team has improved the cluster authentication (AuthN) and authorization (AuthZ) user experience with improved cluster access management controls. This operator is now deprecated. See this and the official announcement.
Language: Python 3.12+
pyenv install 3.13
pyenv local 3.13
pyenv shell 3.13
poetry env use $(pyenv which python)
poetry install
stew ci
poetry env info
kopf run --dev --debug --standalone --liveness=http://:8080/healthz src/kubernetes_operator/iam_mapping.py
You can also test the operator locally in a minikube context.
| WARNING: Make sure you change your context to minikube before doing these commands. |
|---|
kubectl apply -f kubernetes/test/configmap.yamlkubectl apply -f kubernetes/iamidentitymappings.yamlkubectl get cm -n kube-system aws-auth -o yamlkopf run --dev --debug --standalone --liveness=http://:8080/healthz src/kubernetes_operator/iam_mapping.pykubectl apply -f kubernetes/test/test-iam-rolearn.yamlkubectl get cm -n kube-system aws-auth -o yamlkubectl apply -f kubernetes/iamidentitymapping.yaml
kubectl apply -f kubernetes/auth-operator.yaml
# Choose a specific ref and tag if needed
REF=master
TAG=0.8.1
cat <<EOF > kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kube-system
resources:
- https://github.com/coveooss/aws_auth_eks_crd//kubernetes/?ref=$REF
images:
- name: coveo/aws-auth-operator:0.1
newName: ghcr.io/coveooss/aws_auth_eks_crd
newTag: $TAG
EOF
# Deploy
kustomize build . | kubectl apply -f -
Content type
Image
Digest
sha256:e833aaded…
Size
137.4 MB
Last updated
4 months ago
docker pull coveo/aws-auth-operator:0.14.4