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

dynamic-admission-controllers not working with 3.11 and enabled "admission controller webhooks" #170

Open
matzew opened this issue Oct 5, 2018 · 1 comment

Comments

@matzew
Copy link
Contributor

matzew commented Oct 5, 2018

On Minishift with patched oc v3.11 binary, and a workaround to enable admission controller webhooks, the dynamic-admission-controllers addon is not working.

Work-around:

minishift openshift config set --target=kube --patch '{
    "admissionConfig": {
        "pluginConfig": {
            "ValidatingAdmissionWebhook": {
                "configuration": {
                    "apiVersion": "apiserver.config.k8s.io/v1alpha1",
                    "kind": "WebhookAdmission",
                    "kubeConfigFile": "/dev/null"
                }
            },
            "MutatingAdmissionWebhook": {
                "configuration": {
                    "apiVersion": "apiserver.config.k8s.io/v1alpha1",
                    "kind": "WebhookAdmission",
                    "kubeConfigFile": "/dev/null"
                }
            }
        }
    }
}'

See bugzilla why that is needed.

the deployment of the dynamic-admission-controllers are not working:

minishift addon apply dynamic-admission-controllers

gives me:

-- Applying addon 'dynamic-admission-controllers':
Enable required admission configs..Error applying the add-on: Error executing command 'ssh command error:
command : /var/lib/minishift/bin/oc ex config patch /var/lib/minishift/base/kube-apiserver/master-config.yaml.dac -p '{"admissionConfig": {"pluginConfig": {"MutatingAdmissionWebhook": {"configuration": {"apiVersion": "v1", "kind": "DefaultAdmissionConfig", "disable": false } }, "ValidatingAdmissionWebhook": {"configuration": {"apiVersion": "v1", "kind": "DefaultAdmissionConfig", "disable": false }}}}}' > /var/lib/minishift/base/kube-apiserver/master-config.new.yaml
err     : exit status 1
output  : error: merging an object in json but data type is not struct, instead is: map
@douglascamata
Copy link

@matzew thank you! I can confirm that this workaround also works with minishift + OC v3.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants