Closed ralgozino closed 7 months ago
closing because Google's repo has been deprecated and packages are installed from a Kubernetes community instead, there's no indication of the key rotating in the installation instructions: https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl
Our
kube-common
role has a hardcoded value for the Public GPG key ID for the Google Cloud APT repository that is used to install Kubernetes packages:https://github.com/sighupio/fury-kubernetes-on-premises/blob/b4bfa03638a1c7e253be73bca6e08f61d2258938/roles/kube-node-common/vars/main.yml#L7
the new key ID is:
so
This key seems to get rotated often, should we evaluate dropping the hardcoded ID in the ansible role? Otherwise each time we'll have to patch most of the latest on-prem releases.
Another option, that would require manual intervention from the user, would be to document this case and explain how to override the ID. The issue with this approach is that it is not possible to override a single key of a dictionary without changing the merge behaviour for all the roles.
I tried overriding it in the
hosts.ini
, did not work, migrated all my inventory tohosts.yaml
, it did not work either (it doesn't even complain, the custom value gets ignored). The only way to override the value was using the extra vars flag:ansible-playbook 3.cluster.yml --extra-vars='{"kubernetes_repo": {"apt_gpg_key_id": "A362B822F6DEDC652817EA46B53DC80D13EDEF05"}}'
So, if we want to go with override I think we'll need to do a little refactoring and maybe use a single var for the GPG Key ID.