From 53075d8f78c8ba404b7a79e60b7d6d4f1ae89eeb Mon Sep 17 00:00:00 2001 From: njuettner Date: Fri, 25 Oct 2019 14:35:19 +0200 Subject: [PATCH 1/2] OpenAPI v2 Publishing for CRD's --- cluster/config-defaults.yaml | 4 ++++ cluster/node-pools/master-default/userdata.yaml | 2 +- test/e2e/cluster_config.sh | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cluster/config-defaults.yaml b/cluster/config-defaults.yaml index d60fcda24c..65ada71fd1 100644 --- a/cluster/config-defaults.yaml +++ b/cluster/config-defaults.yaml @@ -254,6 +254,10 @@ audit_pod_events: "true" # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definition-versioning/#webhook-conversion custom_resource_webhook_conversion: "false" +# Feature toggle for CustomResourcePublishOpenAPI (alpha in v1.14) +# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#publish-validation-schema-in-openapi-v2 +custom_resource_publish_openapi: "false" + # CIDR configuration for nodes and pods # Changing this will change the number of nodes and pods we can schedule in the # cluster diff --git a/cluster/node-pools/master-default/userdata.yaml b/cluster/node-pools/master-default/userdata.yaml index 39177cae68..d8c0ad35ac 100644 --- a/cluster/node-pools/master-default/userdata.yaml +++ b/cluster/node-pools/master-default/userdata.yaml @@ -120,7 +120,7 @@ write_files: - --authorization-mode=Webhook,RBAC - --authorization-webhook-config-file=/etc/kubernetes/config/authz.yaml - --admission-control-config-file=/etc/kubernetes/config/image-policy-webhook.yaml - - --feature-gates=TaintNodesByCondition={{.Cluster.ConfigItems.experimental_schedule_daemonset_pods}},ScheduleDaemonSetPods={{.Cluster.ConfigItems.experimental_schedule_daemonset_pods}},TTLAfterFinished=true,CustomResourceWebhookConversion={{.Cluster.ConfigItems.custom_resource_webhook_conversion}} + - --feature-gates=TaintNodesByCondition={{.Cluster.ConfigItems.experimental_schedule_daemonset_pods}},ScheduleDaemonSetPods={{.Cluster.ConfigItems.experimental_schedule_daemonset_pods}},TTLAfterFinished=true,CustomResourceWebhookConversion={{.Cluster.ConfigItems.custom_resource_webhook_conversion}},CustomResourcePublishOpenAPI={{.Cluster.ConfigItems.custom_resource_publish_openapi}} - --anonymous-auth=false {{ if or (eq .Cluster.Environment "production") (index .Cluster.ConfigItems "audittrail_url") }} - --audit-webhook-config-file=/etc/kubernetes/config/audit.yaml diff --git a/test/e2e/cluster_config.sh b/test/e2e/cluster_config.sh index c444fec26b..cc9385d2a2 100755 --- a/test/e2e/cluster_config.sh +++ b/test/e2e/cluster_config.sh @@ -46,6 +46,7 @@ clusters: zmon_scheduler_replicas: '0' zmon_worker_replicas: '0' node_pool_feature_enabled: "true" + custom_resource_publish_openapi: "true" enable_rbac: "true" dynamodb_service_link_enabled: "false" skipper_ingress_cpu: 100m From 7e60142906d4d2d1611d094bf428211aba1e4879 Mon Sep 17 00:00:00 2001 From: njuettner Date: Fri, 25 Oct 2019 15:05:40 +0200 Subject: [PATCH 2/2] OpenAPI v2 Publishing for CRD's Signed-off-by: njuettner --- cluster/config-defaults.yaml | 2 +- test/e2e/cluster_config.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cluster/config-defaults.yaml b/cluster/config-defaults.yaml index 65ada71fd1..34f14df028 100644 --- a/cluster/config-defaults.yaml +++ b/cluster/config-defaults.yaml @@ -256,7 +256,7 @@ custom_resource_webhook_conversion: "false" # Feature toggle for CustomResourcePublishOpenAPI (alpha in v1.14) # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#publish-validation-schema-in-openapi-v2 -custom_resource_publish_openapi: "false" +custom_resource_publish_openapi: "true" # CIDR configuration for nodes and pods # Changing this will change the number of nodes and pods we can schedule in the diff --git a/test/e2e/cluster_config.sh b/test/e2e/cluster_config.sh index cc9385d2a2..c444fec26b 100755 --- a/test/e2e/cluster_config.sh +++ b/test/e2e/cluster_config.sh @@ -46,7 +46,6 @@ clusters: zmon_scheduler_replicas: '0' zmon_worker_replicas: '0' node_pool_feature_enabled: "true" - custom_resource_publish_openapi: "true" enable_rbac: "true" dynamodb_service_link_enabled: "false" skipper_ingress_cpu: 100m