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

apiserver: fix incorrect path to admission plugins config files #11779

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ plugins:
{% for plugin in kube_apiserver_enable_admission_plugins %}
{% if plugin in kube_apiserver_admission_plugins_needs_configuration %}
- name: {{ plugin }}
path: {{ kube_config_dir }}/{{ plugin | lower }}.yaml
path: {{ kube_config_dir }}/admission-controls/{{ item | lower }}.yaml.yaml
Copy link
Member

Choose a reason for hiding this comment

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

I think item is undefined, shouldn't that still be plugin? I'm not sure that .yaml.yaml was intentional either.

Also, did this path really need to be updated to fix anything? I believe the following extraVolumes mount configuration is configured in the kubeadm-config files for the admission-controls hostPath directory, which mounted the plugin files in {{ kube_config_dir }}/{{ plugin | lower }}.yaml within the kube-apiserver container before this PR was merged:

  - name: admission-control-configs
    hostPath: {{ kube_config_dir }}/admission-controls
    mountPath: {{ kube_config_dir }}
    readOnly: false
    pathType: DirectoryOrCreate

I think configuring {{ kube_config_dir }}/admission-controls/ is a worthwhile change, but the extraVolumes entry would also need to be updated for this to work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you're perfectly right. I totally forgot that the control plane was in pods, when doing that, + the double extension is obviously wrong...

Should have added a reproducer first 😬

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @chadswen

{% endif %}
{% endfor %}