Skip to content

Commit

Permalink
Update chart with rbac
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha committed Jul 4, 2017
1 parent fd9d6c0 commit ef468bc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 40 deletions.
8 changes: 4 additions & 4 deletions chart/stash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ The following tables lists the configurable parameters of the Stash chart and th
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example:

```bash
$ helm install --name my-release --set image.tag=v0.2.1 stable/stash
$ helm install --name my-release --set image.tag=v0.2.1 chart/stash
```

Alternatively, a YAML file that specifies the values for the parameters can be provided while
installing the chart. For example:

```bash
$ helm install --name my-release --values values.yaml stable/stash
$ helm install --name my-release --values values.yaml chart/stash
```

## RBAC
Expand All @@ -86,13 +86,13 @@ If the output contains "beta" or both "alpha" and "beta" you can may install wit
To enable the creation of RBAC resources (On clusters with RBAC). Do the following:

```console
$ helm install --name my-release stable/stash --set rbac.install=true
$ helm install --name my-release chart/stash --set rbac.install=true
```

### Changing RBAC manifest apiVersion

By default the RBAC resources are generated with the "v1beta1" apiVersion. To use "v1alpha1" do the following:

```console
$ helm install --name my-release stable/stash --set rbac.install=true,rbac.apiVersion=v1alpha1
$ helm install --name my-release chart/stash --set rbac.install=true,rbac.apiVersion=v1alpha1
```
2 changes: 1 addition & 1 deletion chart/stash/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
To verify that Stash has started, run:

kubectl --namespace={{ .Release.Namespace }} get deployments -l "release={{ .Release.Name }}, app={{ template "fullname" . }}"
kubectl --namespace={{ .Release.Namespace }} get deployments -l "release={{ .Release.Name }}, app={{ template "name" . }}"
34 changes: 0 additions & 34 deletions chart/stash/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,38 +67,4 @@ roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ $serviceName }}
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: stash-sidecar
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
app: "{{ template "name" . }}"
heritage: "{{ .Release.Service }}"
release: "{{ .Release.Name }}"
rules:
- apiGroups:
- stash.appscode.com
resources: ["*"]
verbs: ["*"]
- apiGroups:
- extensions
resources:
- deployments
- daemonsets
- replicasets
verbs: ["get"]
- apiGroups: [""]
resources:
- replicationcontrollers
verbs: ["*"]
- apiGroups: [""]
resources:
- secrets
verbs: ["get"]
- apiGroups: [""]
resources:
- events
verbs: ["create"]
{{ end }}
2 changes: 1 addition & 1 deletion docs/rbac.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ rules:
verbs: ["create"]
```
`stash-sidecar` ClusterRole will be automatically created, if you installed Stash using one of the documented methods [here](/docs/install.md).
Create `stash-sidecar` ClusterRole, if it is not already present.

Now, create a RoleBinding for service account used to a workload.
```yaml
Expand Down

0 comments on commit ef468bc

Please sign in to comment.