Skip to content

Commit

Permalink
Merge pull request #118 from kcp-dev/add-authz-webhook-options
Browse files Browse the repository at this point in the history
Add authz webhook options
  • Loading branch information
kcp-ci-bot authored Jan 8, 2025
2 parents 5c5a071 + f339104 commit bc5babb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/kcp/readme.md → charts/kcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Currently configurable options:
* OIDC
* Github user access to project
* External hostname
* Authorization Webhook

### Monitoring

Expand Down
12 changes: 12 additions & 0 deletions charts/kcp/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ spec:
- --profiler-address=0.0.0.0:{{- .Values.kcp.profiling.port -}}
{{- end }}
- --batteries-included={{- include "kcp.batteries" . }}
{{- if .Values.kcp.authorization.webhook.secretName }}
- --authorization-webhook-config-file=/etc/kcp/authorization/webhook/kubeconfig
{{- end }}
{{- range .Values.kcp.extraFlags }}
- {{ . }}
{{- end }}
Expand Down Expand Up @@ -254,6 +257,10 @@ spec:
- name: audit-policy
mountPath: {{ .Values.audit.policy.dir }}
{{- end }}
{{- if .Values.kcp.authorization.webhook.secretName }}
- name: kcp-webhook-authorization
mountPath: /etc/kcp/authorization/webhook
{{- end }}
- name: logical-cluster-admin-kubeconfig
mountPath: /etc/kcp/logical-cluster-admin/kubeconfig
- name: logical-cluster-admin-kubeconfig-cert
Expand Down Expand Up @@ -312,6 +319,11 @@ spec:
persistentVolumeClaim:
claimName: {{ include "kcp.fullname" . }}-audit-logs
{{- end }}
{{- with .Values.kcp.authorization.webhook.secretName }}
- name: kcp-webhook-authorization
secret:
secretName: {{ . }}
{{- end }}
- name: logical-cluster-admin-kubeconfig
secret:
secretName: {{ include "kcp.fullname" . }}-internal-admin-kubeconfig
Expand Down
7 changes: 7 additions & 0 deletions charts/kcp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ kcp:
user-1-token,user-1,1111-1111-1111-1111,"team-1"
admin-token,admin,5555-5555-5555-5555,"system:kcp:admin"
system-token,system,6666-6666-6666-6666,"system:masters"
authorization:
webhook:
# When configured, this Secret must contain a single key, "kubeconfig", containing
# a kubeconfig-style YAML file that configures kcp's authorization webhook.
# See https://docs.kcp.io/kcp/main/concepts/authorization/authorizers/#webhook-authorizer
# for more information.
secretName: ""
hostAliases:
enabled: false
homeWorkspaces:
Expand Down

0 comments on commit bc5babb

Please sign in to comment.