Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CE-716]Fixed the role binding issue #56

Merged
merged 1 commit into from
Oct 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/agent/fabric-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ customresourcedefinition.apiextensions.k8s.io/peers.fabric.hyperledger.org creat
Once the operator crds get created, start up the controller using the following command
```
kubectl apply \
-f https://github.com/hyperledger/cello/blob/master/src/agent/fabric-operator/deploy/service_account.yaml?raw=true \
-f https://github.com/hyperledger/cello/blob/master/src/agent/fabric-operator/deploy/role.yaml?raw=true \
-f https://github.com/hyperledger/cello/blob/master/src/agent/fabric-operator/deploy/role_binding.yaml?raw=true \
-f https://github.com/hyperledger/cello/blob/master/src/agent/fabric-operator/deploy/fabric-operator.yaml?raw=true \
-f https://github.com/hyperledger/cello/blob/master/src/agent/fabric-operator/deploy/operator.yaml?raw=true
```
The above command starts up the fabric operator controller in your k8s cluster. If your k8s cluster already has the controller running, you can skip this step.
The above command starts up the fabric operator controller in your default namespace of your k8s cluster. If you try to use
a different namespace, you should download the fabric-operator.yaml file and change the namespace from default to whatever
the namespace that you want to use.

### [Stand up a Fabric CA node](#startupca)

Expand Down
110 changes: 110 additions & 0 deletions src/agent/fabric-operator/deploy/fabric-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: ServiceAccount
metadata:
name: fabric-operator

- apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: fabric-operator
rules:
- apiGroups:
- ""
resources:
- pods
- services
- endpoints
- persistentvolumeclaims
- events
- configmaps
- secrets
verbs:
- '*'
- apiGroups:
- apps
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
verbs:
- '*'
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- get
- create
- apiGroups:
- apps
resourceNames:
- fabric-operator
resources:
- deployments/finalizers
verbs:
- update
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- apiGroups:
- apps
resources:
- replicasets
verbs:
- get
- apiGroups:
- fabric.hyperledger.org
resources:
- '*'
- peers
- orderers
verbs:
- '*'

- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: cluster-fabric-operator
rules:
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch

- apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: fabric-operator
roleRef:
kind: Role
name: fabric-operator
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: fabric-operator

- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cluster-fabric-operator
roleRef:
kind: ClusterRole
name: cluster-fabric-operator
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: fabric-operator
namespace: "default"
2 changes: 1 addition & 1 deletion src/agent/fabric-operator/deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
image: hyperledger/cello-fabric-operator:latest
command:
- fabric-operator
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
env:
- name: WATCH_NAMESPACE
valueFrom:
Expand Down
62 changes: 0 additions & 62 deletions src/agent/fabric-operator/deploy/role.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions src/agent/fabric-operator/deploy/role_binding.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions src/agent/fabric-operator/deploy/service_account.yaml

This file was deleted.