Skip to content

Commit

Permalink
Svpi61 vault init (#118)
Browse files Browse the repository at this point in the history
Svpi61 vault init
  • Loading branch information
sparkoo authored Feb 21, 2022
1 parent d348f97 commit e7a3bbd
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ SPI components fails to start right after the bootstrap. It requires manual conf

This process is automated in `preview mode` see below.

SPI Vault instance has to be manually initialized. There is a script to help with that:
1) Make sure that your cluster user has at least permissions `./components/spi/vault_role.yaml`
2) Clone SPI operator repo `git clone https://github.com/redhat-appstudio/service-provider-integration-operator && cd service-provider-integration-operator`
3) run `vault-init.sh` script from repo root directory `./hack/vault-init.sh`

### Install Toolchain (Sandbox) Operators
There are two scripts which you can use:
- `./hack/sandbox-development-mode.sh` for development mode
Expand Down
14 changes: 14 additions & 0 deletions components/authentication/spi-vault-admin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: spi-vault-admin
namespace: spi-system
subjects:
- kind: User
name: skabashnyuk
- kind: User
name: sparkoo
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: spi-vault-admin
2 changes: 2 additions & 0 deletions components/authentication/view-spi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ subjects:
name: skabashnyuk
- kind: User
name: sbose78
- kind: User
name: sparkoo
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
3 changes: 2 additions & 1 deletion components/spi/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
resources:
- argocd-permissions.yaml
- https://github.com/redhat-appstudio/service-provider-integration-operator/config/default?ref=53e870e32db78603485621337f57c09793bcf06f
- https://github.com/redhat-appstudio/service-provider-integration-operator/config/default?ref=faca4bea8d65c80ab0bea3ce25d56346f2c86201
- oauth_route.yaml
- https://github.com/redhat-appstudio/service-provider-integration-scm-file-retriever/server/config/default?ref=381f7746b88019ea13d4aa42e71b01ac9bb2ec1e
- scm_route.yaml
- vault_role.yaml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
Expand Down
26 changes: 26 additions & 0 deletions components/spi/vault_role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: spi-vault-admin
rules:
- verbs:
- get
- delete
apiGroups:
- ''
resources:
- pods
- verbs:
- create
apiGroups:
- ''
resources:
- pods/exec
- verbs:
- get
- delete
- create
apiGroups:
- ''
resources:
- secrets

0 comments on commit e7a3bbd

Please sign in to comment.