Skip to content

Commit b0eab12

Browse files
committed
Add olly application
Add an observability application for local testing. The initial implementation uses the Red Hat Observability Operator APIs and configuration that is deployed in the redhat-appstudio repository. Additional RBAC is needed as the deployment for appstudio assumes ArgoCD effectively has cluster-admin rights, whereas Pipeline Service takes a more restrictive approach.
1 parent 1f6c7e7 commit b0eab12

File tree

7 files changed

+123
-1
lines changed

7 files changed

+123
-1
lines changed

developer/openshift/dev_setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ install_pipeline_service() {
241241

242242
# Patch the url/branch to target the expected repository/branch
243243
manifest_dir="$(find "$WORK_DIR/environment/compute" -mindepth 1 -maxdepth 1 -type d)"
244-
for app in "pipeline-service" "pipeline-service-storage"; do
244+
for app in "pipeline-service" "pipeline-service-storage" "pipeline-service-o11y"; do
245245
cat << EOF >"$manifest_dir/patch-$app.yaml"
246246
---
247247
apiVersion: argoproj.io/v1alpha1

developer/openshift/gitops/argocd/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ kind: Kustomization
55
resources:
66
- pipeline-service.yaml
77
- pipeline-service-storage.yaml
8+
- pipeline-service-o11y.yaml
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
apiVersion: argoproj.io/v1alpha1
3+
kind: Application
4+
metadata:
5+
name: pipeline-service-o11y
6+
namespace: openshift-gitops
7+
spec:
8+
destination:
9+
namespace: openshift-gitops
10+
server: https://kubernetes.default.svc
11+
source:
12+
path: developer/openshift/gitops/argocd/pipeline-service-o11y
13+
repoURL: https://github.com/openshift-pipelines/pipeline-service.git
14+
targetRevision: main
15+
project: default
16+
syncPolicy:
17+
# Comment this out if you want to manually trigger deployments (using the
18+
# Argo CD Web UI or Argo CD CLI), rather than automatically deploying on
19+
# every new Git commit to your directory.
20+
automated:
21+
prune: true
22+
selfHeal: true
23+
syncOptions:
24+
- CreateNamespace=true
25+
retry:
26+
limit: -1 # number of failed sync attempt retries; unlimited number of attempts if less than 0
27+
backoff:
28+
duration: 10s # the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h")
29+
factor: 2 # a factor to multiply the base duration after each failed retry
30+
maxDuration: 3m # the maximum amount of time allowed for the backoff strategy
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Pipeline Service Observability
2+
3+
This deploys observability (o11y) components used to configure Prometheus.
4+
It utilizes the o11y stack from redhat-appstudio, with modifications to only deploy
5+
what is needed by the Pipeline Service for inner-loop development.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: openshift-gitops-apply-prometheus
6+
rules:
7+
- apiGroups:
8+
- monitoring.rhobs
9+
resources:
10+
- monitoringstacks
11+
- servicemonitors
12+
verbs:
13+
- get
14+
- list
15+
- patch
16+
- create
17+
- update
18+
- delete
19+
- apiGroups:
20+
- monitoring.coreos.com
21+
resources:
22+
- prometheusrules
23+
verbs:
24+
- get
25+
- list
26+
- patch
27+
- create
28+
- update
29+
- delete
30+
---
31+
apiVersion: rbac.authorization.k8s.io/v1
32+
kind: ClusterRoleBinding
33+
metadata:
34+
name: openshift-gitops-apply-prometheus
35+
roleRef:
36+
apiGroup: rbac.authorization.k8s.io
37+
kind: ClusterRole
38+
name: openshift-gitops-apply-prometheus
39+
subjects:
40+
- kind: ServiceAccount
41+
name: openshift-gitops-argocd-application-controller
42+
namespace: openshift-gitops
43+
---
44+
apiVersion: rbac.authorization.k8s.io/v1
45+
kind: Role
46+
metadata:
47+
name: openshift-gitops-manage-secrets
48+
namespace: o11y
49+
rules:
50+
- apiGroups:
51+
- ""
52+
resources:
53+
- secrets
54+
verbs:
55+
- get
56+
- list
57+
- create
58+
- update
59+
- patch
60+
- delete
61+
---
62+
apiVersion: rbac.authorization.k8s.io/v1
63+
kind: RoleBinding
64+
metadata:
65+
name: openshift-gitops-manage-secrets
66+
namespace: o11y
67+
roleRef:
68+
apiGroup: rbac.authorization.k8s.io
69+
kind: Role
70+
name: openshift-gitops-manage-secrets
71+
subjects:
72+
- kind: ServiceAccount
73+
name: openshift-gitops-argocd-application-controller
74+
namespace: openshift-gitops
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
resources:
5+
- allow-argocd-to-manage.yaml
6+
- https://github.com/redhat-appstudio/infra-deployments/components/o11y/development?ref=main
7+
- https://github.com/redhat-appstudio/infra-deployments/components/monitoring/prometheus/development?ref=main
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
resources:
5+
- appstudio-prometheus

0 commit comments

Comments
 (0)