Skip to content

Commit d98821b

Browse files
committed
ROX-27130: Reconcile operators using ArgoCD
1 parent 2d9d4be commit d98821b

28 files changed

+891
-1243
lines changed

dev/config/gitops-config.yaml

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,55 @@
1-
rhacsOperators:
2-
crdUrls:
3-
- https://raw.githubusercontent.com/stackrox/stackrox/4.6.2/operator/bundle/manifests/platform.stackrox.io_securedclusters.yaml
4-
- https://raw.githubusercontent.com/stackrox/stackrox/4.6.2/operator/bundle/manifests/platform.stackrox.io_centrals.yaml
5-
operators:
6-
- deploymentName: "rhacs-operator-dev"
7-
image: "registry.redhat.io/advanced-cluster-security/rhacs-rhel8-operator@sha256:a96572d0df791da60763dec4b4f0f52124772c3649303170968806dcc3de8269" # 4.6.2
8-
centralLabelSelector: "rhacs.redhat.com/version-selector=dev"
9-
securedClusterReconcilerEnabled: false
10-
verticalPodAutoscaling:
11-
recommenders: []
1+
applications:
2+
3+
# Install the RHACS CRDs (Central and SecuredCluster)
4+
- metadata:
5+
name: rhacs-crds
6+
spec:
7+
destination:
8+
namespace: my-app
9+
server: https://kubernetes.default.svc
10+
project: default
11+
source:
12+
directory:
13+
include: '{platform.stackrox.io_centrals.yaml,platform.stackrox.io_securedclusters.yaml}'
14+
path: operator/bundle/manifests
15+
repoURL: https://github.com/stackrox/stackrox
16+
targetRevision: 4.6.2
17+
syncPolicy:
18+
automated:
19+
prune: true
20+
selfHeal: true
21+
syncOptions:
22+
- ServerSideApply=true
23+
24+
# Install the rhacs-operators
25+
- metadata:
26+
name: rhacs-operators
27+
spec:
28+
ignoreDifferences:
29+
- kind: ServiceAccount
30+
jsonPointers:
31+
- /imagePullSecrets
32+
destination:
33+
namespace: rhacs
34+
server: https://kubernetes.default.svc
35+
project: default
36+
syncPolicy:
37+
automated:
38+
prune: true
39+
selfHeal: true
40+
source:
41+
path: rhacs-operator-legacy
42+
repoURL: https://github.com/stackrox/acscs-manifests
43+
targetRevision: HEAD
44+
helm:
45+
valuesObject:
46+
operator:
47+
images:
48+
- deploymentName: "rhacs-operator-4.6.2"
49+
image: "registry.redhat.io/advanced-cluster-security/rhacs-rhel8-operator@sha256:a96572d0df791da60763dec4b4f0f52124772c3649303170968806dcc3de8269"
50+
centralLabelSelector: "rhacs.redhat.com/version-selector=4.6.2"
51+
securedClusterLabelSelector: "rhacs.redhat.com/selector=dogfooding"
52+
1253
tenantResources:
1354
default: |
1455
rolloutGroup: "dev"

dev/env/manifests/openshift-gitops/04-clusterrole.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ kind: ClusterRole
55
metadata:
66
name: custom-acscs-openshift-gitops
77
rules:
8+
# Allow managing stackrox centrals and securedClusters
89
- apiGroups: [ "platform.stackrox.io" ]
910
resources: [ "centrals" ]
1011
verbs: [ "*" ]
12+
# Allow managing CRDs
13+
- apiGroups: [ "apiextensions.k8s.io" ]
14+
resources: [ "customresourcedefinitions" ]
15+
verbs: [ "*" ]
1116
---
1217
apiVersion: rbac.authorization.k8s.io/v1
1318
kind: ClusterRoleBinding

dev/env/manifests/shared/00-namespace.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@ kind: Namespace
22
apiVersion: v1
33
metadata:
44
name: "$ACSCS_NAMESPACE"
5+
labels:
6+
argocd.argoproj.io/managed-by: "$ARGOCD_NAMESPACE"
57
---
68
kind: Namespace
79
apiVersion: v1
810
metadata:
911
name: $STACKROX_OPERATOR_NAMESPACE
12+
labels:
13+
argocd.argoproj.io/managed-by: "$ARGOCD_NAMESPACE"
1014
---
1115
kind: Namespace
1216
apiVersion: v1
1317
metadata:
1418
name: rhacs-vertical-pod-autoscaler
19+
labels:
20+
argocd.argoproj.io/managed-by: "$ARGOCD_NAMESPACE"

0 commit comments

Comments
 (0)