Skip to content

Commit

Permalink
Merge pull request #119 from christophd/issue/118/knative-steps
Browse files Browse the repository at this point in the history
fix(#118): Add Knative steps
  • Loading branch information
christophd authored Jul 24, 2020
2 parents 88ec0d7 + e137944 commit f4b8149
Show file tree
Hide file tree
Showing 59 changed files with 3,356 additions and 118 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ clean:
generate:
operator-sdk generate k8s

build: build-yaks
build: build-resources build-yaks

test: build
go test ./...
Expand All @@ -45,7 +45,7 @@ docker-image:
mkdir -p build/_output/bin
operator-sdk build $(IMAGE_NAME):$(VERSION)

images-no-test: package-artifacts-no-test docker-image
images-no-test: build package-artifacts-no-test docker-image

images: test package-artifacts docker-image

Expand Down
1 change: 1 addition & 0 deletions deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Deployment
metadata:
name: yaks
labels:
org.citrusframework.yaks/app: "yaks"
org.citrusframework.yaks/component: operator
spec:
replicas: 1
Expand Down
93 changes: 85 additions & 8 deletions deploy/resources.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 31 additions & 1 deletion deploy/role.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: yaks
labels:
org.citrusframework.yaks/app: "yaks"
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -89,6 +90,35 @@ rules:
- patch
- update
- watch
- apiGroups:
- eventing.knative.dev
resources:
- brokers
- triggers
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
- apiGroups:
- messaging.knative.dev
resources:
- channels
- inmemorychannels
- subscriptions
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
- apiGroups:
- org.citrusframework.yaks
resources:
Expand Down
2 changes: 2 additions & 0 deletions deploy/role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: yaks
labels:
org.citrusframework.yaks/app: "yaks"
subjects:
- kind: ServiceAccount
name: yaks
Expand Down
2 changes: 2 additions & 0 deletions deploy/service_account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: yaks
labels:
org.citrusframework.yaks/app: "yaks"
1 change: 1 addition & 0 deletions deploy/user_cluster_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: yaks:edit
labels:
org.citrusframework.yaks/app: "yaks"
# Add these permissions to the "admin" and "edit" default roles.
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
Expand Down
51 changes: 46 additions & 5 deletions deploy/viewer_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,33 @@ kind: Role
metadata:
name: yaks-viewer
labels:
app: "yaks"
org.citrusframework.yaks/app: "yaks"
rules:
- apiGroups:
- ""
resources:
- configmaps
- endpoints
- persistentvolumeclaims
- pods
- persistentvolumeclaims
- secrets
- serviceaccounts
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- services
- secrets
- endpoints
- configmaps
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
Expand Down Expand Up @@ -51,3 +63,32 @@ rules:
- patch
- update
- watch
- apiGroups:
- eventing.knative.dev
resources:
- brokers
- triggers
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
- apiGroups:
- messaging.knative.dev
resources:
- channels
- inmemorychannels
- subscriptions
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
2 changes: 1 addition & 1 deletion deploy/viewer_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: yaks-viewer
labels:
app: "yaks"
org.citrusframework.yaks/app: "yaks"
subjects:
- kind: ServiceAccount
name: yaks-viewer
Expand Down
2 changes: 1 addition & 1 deletion deploy/viewer_service_account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ kind: ServiceAccount
metadata:
name: yaks-viewer
labels:
app: "yaks"
org.citrusframework.yaks/app: "yaks"
Loading

0 comments on commit f4b8149

Please sign in to comment.