Skip to content

Commit

Permalink
add deployment and role for watcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivam Mukhade committed May 18, 2022
1 parent f81722e commit f4b25e4
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/200-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch"]
# Required for the reconciler/watcher
# TODO: create separate role for reconciler
- apiGroups: [ "coordination.k8s.io" ]
resources: [ "leases" ]
verbs: [ "get", "list", "create", "update", "delete", "patch", "watch" ]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
46 changes: 46 additions & 0 deletions config/500-watcher.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2022 Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: pipelines-as-code-watcher
namespace: pipelines-as-code
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: watcher
app.kubernetes.io/component: watcher
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: pipelines-as-code
template:
metadata:
labels:
app.kubernetes.io/name: watcher
app.kubernetes.io/component: watcher
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: pipelines-as-code
app.kubernetes.io/version: "devel"
spec:
serviceAccountName: pipelines-as-code-controller
containers:
- name: pac-watcher
image: "ko://github.com/openshift-pipelines/pipelines-as-code/cmd/pipelines-as-code-watcher"
imagePullPolicy: Always
env:
- name: SYSTEM_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace

0 comments on commit f4b25e4

Please sign in to comment.