diff --git a/manifests/bases/source-watcher/account.yaml b/manifests/bases/source-watcher/account.yaml new file mode 100644 index 00000000..59132e3e --- /dev/null +++ b/manifests/bases/source-watcher/account.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: source-watcher diff --git a/manifests/bases/source-watcher/kustomization.yaml b/manifests/bases/source-watcher/kustomization.yaml new file mode 100644 index 00000000..17bc7bc6 --- /dev/null +++ b/manifests/bases/source-watcher/kustomization.yaml @@ -0,0 +1,15 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- https://github.com/fluxcd/source-watcher/releases/download/v2.0.0/source-watcher.crds.yaml +- https://github.com/fluxcd/source-watcher/releases/download/v2.0.0/source-watcher.deployment.yaml +- account.yaml +transformers: +- labels.yaml +patches: +- target: + group: apps + version: v1 + kind: Deployment + name: source-watcher + path: patch.yaml diff --git a/manifests/bases/source-watcher/labels.yaml b/manifests/bases/source-watcher/labels.yaml new file mode 100644 index 00000000..5bca36ab --- /dev/null +++ b/manifests/bases/source-watcher/labels.yaml @@ -0,0 +1,13 @@ +apiVersion: builtin +kind: LabelTransformer +metadata: + name: labels +labels: + app.kubernetes.io/component: source-watcher + app.kubernetes.io/part-of: flux +fieldSpecs: + - path: metadata/labels + create: true + - kind: Deployment + path: spec/template/metadata/labels + create: true diff --git a/manifests/bases/source-watcher/patch.yaml b/manifests/bases/source-watcher/patch.yaml new file mode 100644 index 00000000..ec3616b2 --- /dev/null +++ b/manifests/bases/source-watcher/patch.yaml @@ -0,0 +1,17 @@ +- op: add + path: /spec/template/spec/containers/0/args/0 + value: --events-addr=http://notification-controller.flux-system.svc.cluster.local./ +- op: add + path: /spec/template/spec/serviceAccountName + value: source-watcher +- op: add + path: /spec/template/spec/priorityClassName + value: system-cluster-critical +- op: add + path: /spec/template/spec/containers/0/env/- + value: + name: GOMEMLIMIT + valueFrom: + resourceFieldRef: + containerName: manager + resource: limits.memory diff --git a/manifests/crds/kustomization.yaml b/manifests/crds/kustomization.yaml index de5dd9e7..aea9c296 100644 --- a/manifests/crds/kustomization.yaml +++ b/manifests/crds/kustomization.yaml @@ -7,3 +7,4 @@ resources: - https://github.com/fluxcd/notification-controller/releases/download/v1.6.0/notification-controller.crds.yaml - https://github.com/fluxcd/image-reflector-controller/releases/download/v1.0.0/image-reflector-controller.crds.yaml - https://github.com/fluxcd/image-automation-controller/releases/download/v0.41.2/image-automation-controller.crds.yaml +- https://github.com/fluxcd/source-watcher/releases/download/v2.0.0/source-watcher.crds.yaml diff --git a/manifests/rbac/controller.yaml b/manifests/rbac/controller.yaml index 9f5e18eb..e80996fc 100644 --- a/manifests/rbac/controller.yaml +++ b/manifests/rbac/controller.yaml @@ -18,6 +18,9 @@ rules: - apiGroups: ['image.toolkit.fluxcd.io'] resources: ['*'] verbs: ['*'] +- apiGroups: ['source.extensions.fluxcd.io'] + resources: ['*'] + verbs: ['*'] - apiGroups: - "" resources: @@ -109,3 +112,6 @@ subjects: - kind: ServiceAccount name: image-automation-controller namespace: flux-system + - kind: ServiceAccount + name: source-watcher + namespace: flux-system