Skip to content

Commit

Permalink
manifests
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Wang <[email protected]>
  • Loading branch information
whynowy committed Jan 16, 2021
1 parent 4e2c0d4 commit d1df3ce
Show file tree
Hide file tree
Showing 22 changed files with 603 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ crds:
.PHONY: manifests
manifests: crds
kustomize build manifests/cluster-install > manifests/install.yaml
kustomize build manifests/cluster-install-no-extention > manifests/install-no-extension.yaml
kustomize build manifests/namespace-install > manifests/namespace-install.yaml

.PHONY: swagger
Expand Down Expand Up @@ -239,3 +240,6 @@ quay-release: eventbus-controller-image sensor-controller-image sensor-image eve

docker tag $(IMAGE_PREFIX)eventsource:$(IMAGE_TAG) quay.io/$(IMAGE_PREFIX)eventsource:$(IMAGE_TAG)
docker push quay.io/$(IMAGE_PREFIX)eventsource:$(IMAGE_TAG)

docker tag $(IMAGE_PREFIX)events-webhook:$(IMAGE_TAG) quay.io/$(IMAGE_PREFIX)events-webhook:$(IMAGE_TAG)
docker push quay.io/$(IMAGE_PREFIX)events-webhook:$(IMAGE_TAG)
1 change: 0 additions & 1 deletion common/tls/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ func createServerCertTemplate(org string, hosts []string, notAfter time.Time) (*
// Sign the cert
func createCert(template, parent *x509.Certificate, pub, parentPriv interface{}) (
cert *x509.Certificate, certPEM []byte, err error) {

certDER, err := x509.CreateCertificate(rand.Reader, template, parent, pub, parentPriv)
if err != nil {
return
Expand Down
9 changes: 9 additions & 0 deletions manifests/cluster-install-no-extention/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../base
- rbac

namespace: argo-events

4 changes: 2 additions & 2 deletions manifests/cluster-install/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../base
- rbac
- ../cluster-install-no-extention
- ../extentions

namespace: argo-events

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo-events-webhook-sa
27 changes: 27 additions & 0 deletions manifests/extentions/events-webhook/events-webhook-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: events-webhook
spec:
replicas: 1
selector:
matchLabels:
app: events-webhook
template:
metadata:
labels:
app: events-webhook
spec:
containers:
- name: webhook
image: argoproj/events-webhook:latest
imagePullPolicy: Always
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
serviceAccountName: argo-events-webhook-sa
securityContext:
runAsNonRoot: true
runAsUser: 9731
10 changes: 10 additions & 0 deletions manifests/extentions/events-webhook/events-webhook-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: events-webhook
spec:
ports:
- port: 443
targetPort: 443
selector:
app: events-webhook
8 changes: 8 additions & 0 deletions manifests/extentions/events-webhook/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- argo-events-webhook-sa.yaml
- rbac
- events-webhook-deployment.yaml
- events-webhook-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: argo-events-webhook-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: argo-events-webhook
subjects:
- kind: ServiceAccount
name: argo-events-webhook-sa
namespace: argo-events
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: argo-events-webhook
rules:
- apiGroups:
- ""
resources:
- secrets
- configmaps
verbs:
- get
- list
- create
- update
- delete
- patch
- watch
- apiGroups:
- apps
resources:
- deployments
verbs:
- get
- list
- apiGroups:
- admissionregistration.k8s.io
resources:
- validatingwebhookconfigurations
verbs:
- get
- list
- create
- update
- delete
- patch
- watch
6 changes: 6 additions & 0 deletions manifests/extentions/events-webhook/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- argo-events-webhook-cluster-role.yaml
- argo-events-webhook-cluster-role-binding.yaml
14 changes: 14 additions & 0 deletions manifests/extentions/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Update the versions in this file.
#

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- events-webhook

images:
- name: argoproj/events-webhook
newTag: latest

Loading

0 comments on commit d1df3ce

Please sign in to comment.