-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Cryptophobia/master
fix(charts): Adding clusterroles for RBAC support
- Loading branch information
Showing
8 changed files
with
63 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# How to Contribute | ||
|
||
This project is part of Deis. You can find the latest contribution | ||
guidelines [at the Deis project](https://github.com/deisthree/deis/blob/master/CONTRIBUTING.md). | ||
This project is part of Hephy. You can find the latest contribution | ||
guidelines [at the Hephy project](https://github.com/teamhephy/deis/blob/master/CONTRIBUTING.md). | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Deis Maintainers | ||
|
||
This project is part of Deis. The official maintainers documentation is | ||
located [in the main project](https://github.com/deisthree/deis/blob/master/MAINTAINERS.md). | ||
This project is part of Hephy. The official maintainers documentation is | ||
located [in the main project](https://github.com/teamhephy/deis/blob/master/MAINTAINERS.md). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{/* | ||
Set apiVersion based on Kubernetes version | ||
*/}} | ||
{{- define "rbacAPIVersion" -}} | ||
{{- if (lt (int (.Capabilities.KubeVersion.Minor)) 6) -}} | ||
rbac.authorization.k8s.io/v1alpha1 | ||
{{- else if (and (ge (int (.Capabilities.KubeVersion.Minor)) 6) (le (int (.Capabilities.KubeVersion.Minor)) 7)) -}} | ||
rbac.authorization.k8s.io/v1beta1 | ||
{{- else -}} | ||
rbac.authorization.k8s.io/v1 | ||
{{- end -}} | ||
{{- end -}} |
21 changes: 21 additions & 0 deletions
21
charts/workflow-manager/templates/workflow-manager-clusterrole.yaml
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,21 @@ | ||
{{- if (.Values.global.use_rbac) -}} | ||
{{- if (.Capabilities.APIVersions.Has (include "rbacAPIVersion" .)) -}} | ||
kind: ClusterRole | ||
apiVersion: {{ template "rbacAPIVersion" . }} | ||
metadata: | ||
name: deis:deis-workflow-manager | ||
labels: | ||
app: deis-workflow-manager | ||
heritage: deis | ||
rules: | ||
- apiGroups: ["extensions", "apps"] | ||
resources: ["deployments", "daemonsets"] | ||
verbs: ["get", "list"] | ||
- apiGroups: [""] | ||
resources: ["namespaces", "replicationcontrollers"] | ||
verbs: ["get", "list"] | ||
- apiGroups: [""] | ||
resources: ["secrets"] | ||
verbs: ["get", "list", "create", "delete", "update"] | ||
{{- end -}} | ||
{{- end -}} |
19 changes: 19 additions & 0 deletions
19
charts/workflow-manager/templates/workflow-manager-clusterrolebinding.yaml
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,19 @@ | ||
{{- if (.Values.global.use_rbac) -}} | ||
{{- if (.Capabilities.APIVersions.Has (include "rbacAPIVersion" .)) -}} | ||
kind: ClusterRoleBinding | ||
apiVersion: {{ template "rbacAPIVersion" . }} | ||
metadata: | ||
name: deis:deis-workflow-manager | ||
labels: | ||
app: deis-workflow-manager | ||
heritage: deis | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: deis:deis-workflow-manager | ||
subjects: | ||
- kind: ServiceAccount | ||
name: deis-workflow-manager | ||
namespace: {{ .Release.Namespace }} | ||
{{- end -}} | ||
{{- end -}} |
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