Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 2682208

Browse files
committed
Merge pull request kubernetes#25530 from kubernetes/revert-25296-gcpauthz
Revert "Add configuration for GCP webhook authorization."
2 parents 2706df1 + bfb49d0 commit 2682208

File tree

2 files changed

+2
-37
lines changed

2 files changed

+2
-37
lines changed

cluster/gce/configure-vm.sh

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -791,37 +791,14 @@ EOF
791791
CLOUD_CONFIG=/etc/gce.conf
792792
fi
793793

794-
if [[ -n "${CLOUD_CONFIG:-}" ]]; then
794+
if [[ -n ${CLOUD_CONFIG:-} ]]; then
795795
cat <<EOF >>/etc/salt/minion.d/grains.conf
796796
cloud_config: ${CLOUD_CONFIG}
797797
EOF
798798
else
799799
rm -f /etc/gce.conf
800800
fi
801801

802-
if [[ -n "${GCP_AUTHZ_URL:-}" ]]; then
803-
cat <<EOF >>/etc/salt/minion.d/grains.conf
804-
webhook_authorization_config: /etc/gcp_authz.config
805-
EOF
806-
cat <<EOF >/etc/gcp_authz.config
807-
clusters:
808-
- name: gcp-authorization-server
809-
cluster:
810-
server: ${GCP_AUTHZ_URL}
811-
users:
812-
- name: kube-apiserver
813-
user:
814-
auth-provider:
815-
name: gcp
816-
current-context: webhook
817-
contexts:
818-
- context:
819-
cluster: gcp-authorization-server
820-
user: kube-apiserver
821-
name: webhook
822-
EOF
823-
fi
824-
825802
# If the kubelet on the master is enabled, give it the same CIDR range
826803
# as a generic node.
827804
if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then

cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,6 @@
8383
{% set abac_policy_file = " --authorization-policy-file=/srv/kubernetes/abac-authz-policy.jsonl" -%}
8484
{% endif -%}
8585

86-
{% set webhook_authorization_config = "" -%}
87-
{% set webhook_config_mount = "" -%}
88-
{% set webhook_config_volume = "" -%}
89-
{% if grains.webhook_authorization_config is defined -%}
90-
{% set webhook_authorization_config = " --authorization-webhook-config-file=" + grains.webhook_authorization_config -%}
91-
{% set webhook_config_mount = "{\"name\": \"webhookconfigmount\",\"mountPath\": \"" + grains.webhook_authorization_config + "\", \"readOnly\": false}," -%}
92-
{% set webhook_config_volume = "{\"name\": \"webhookconfigmount\",\"hostPath\": {\"path\": \"" + grains.webhook_authorization_config + "\"}}," -%}
93-
{% set authz_mode = authz_mode + ",Webhook" -%}
94-
{% endif -%}
95-
9686
{% set admission_control = "" -%}
9787
{% if pillar['admission_control'] is defined -%}
9888
{% set admission_control = "--admission-control=" + pillar['admission_control'] -%}
@@ -109,7 +99,7 @@
10999
{% endif -%}
110100

111101
{% set params = address + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " + service_cluster_ip_range + " " + client_ca_file + basic_auth_file + " " + min_request_timeout -%}
112-
{% set params = params + " " + cert_file + " " + key_file + " --secure-port=" + secure_port + token_auth_file + " " + bind_address + " " + log_level + " " + advertise_address + " " + proxy_ssh_options + authz_mode + abac_policy_file + webhook_authorization_config-%}
102+
{% set params = params + " " + cert_file + " " + key_file + " --secure-port=" + secure_port + token_auth_file + " " + bind_address + " " + log_level + " " + advertise_address + " " + proxy_ssh_options + authz_mode + abac_policy_file -%}
113103

114104
# test_args has to be kept at the end, so they'll overwrite any prior configuration
115105
{% if pillar['apiserver_test_args'] is defined -%}
@@ -162,7 +152,6 @@
162152
],
163153
"volumeMounts": [
164154
{{cloud_config_mount}}
165-
{{webhook_config_mount}}
166155
{{additional_cloud_config_mount}}
167156
{ "name": "srvkube",
168157
"mountPath": "{{srv_kube_path}}",
@@ -190,7 +179,6 @@
190179
],
191180
"volumes":[
192181
{{cloud_config_volume}}
193-
{{webhook_config_volume}}
194182
{{additional_cloud_config_volume}}
195183
{ "name": "srvkube",
196184
"hostPath": {

0 commit comments

Comments
 (0)