forked from kubernetes-sigs/kubespray
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow webhook authorization (kubernetes-sigs#6502)
- Loading branch information
Showing
6 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
roles/kubernetes/master/templates/webhook-authorization-config.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# clusters refers to the remote service. | ||
clusters: | ||
- name: webhook-token-authz-cluster | ||
cluster: | ||
server: {{ kube_webhook_authorization_url }} | ||
insecure-skip-tls-verify: {{ kube_webhook_authorization_url_skip_tls_verify }} | ||
|
||
# users refers to the API server's webhook configuration. | ||
users: | ||
- name: webhook-token-authz-user | ||
|
||
# kubeconfig files require a context. Provide one for the API server. | ||
current-context: webhook-token-authz | ||
contexts: | ||
- context: | ||
cluster: webhook-token-authz-cluster | ||
user: webhook-token-authz-user | ||
name: webhook-token-authz |