|
| 1 | +apiVersion: v1 |
| 2 | +kind: Namespace |
| 3 | +metadata: |
| 4 | + name: image-updater-e2e-006-01 |
| 5 | +--- |
| 6 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 7 | +kind: Role |
| 8 | +metadata: |
| 9 | + name: argocd-application-controller |
| 10 | + namespace: image-updater-e2e-006-01 # Target namespace where the app will be deployed |
| 11 | +rules: |
| 12 | + - apiGroups: [""] |
| 13 | + resources: ["pods", "services", "replicationcontrollers"] |
| 14 | + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] |
| 15 | + - apiGroups: ["apps"] |
| 16 | + resources: ["deployments", "daemonsets", "replicasets", "statefulsets"] |
| 17 | + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] |
| 18 | + - apiGroups: ["extensions"] |
| 19 | + resources: ["ingresses"] |
| 20 | + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] |
| 21 | +--- |
| 22 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 23 | +kind: RoleBinding |
| 24 | +metadata: |
| 25 | + name: argocd-application-controller-binding |
| 26 | + namespace: image-updater-e2e-006-01 # Namespace where the Argo CD application is managed |
| 27 | +roleRef: |
| 28 | + apiGroup: rbac.authorization.k8s.io |
| 29 | + kind: Role |
| 30 | + name: argocd-application-controller |
| 31 | + namespace: argocd-image-updater-e2e # Namespace where the Argo CD application controller is running |
| 32 | +subjects: |
| 33 | + - kind: ServiceAccount |
| 34 | + name: argocd-application-controller |
| 35 | + namespace: argocd-image-updater-e2e # Namespace where the Argo CD application controller is running |
| 36 | +--- |
| 37 | +apiVersion: v1 |
| 38 | +kind: ConfigMap |
| 39 | +metadata: |
| 40 | + name: argocd-cmd-params-cm |
| 41 | + namespace: argocd-image-updater-e2e |
| 42 | + labels: |
| 43 | + app.kubernetes.io/name: argocd-cmd-params-cm |
| 44 | + app.kubernetes.io/part-of: argocd |
| 45 | +data: |
| 46 | + application.namespaces: '*' |
| 47 | +--- |
| 48 | +kind: AppProject |
| 49 | +apiVersion: argoproj.io/v1alpha1 |
| 50 | +metadata: |
| 51 | + name: project-one |
| 52 | + namespace: argocd-image-updater-e2e |
| 53 | +spec: |
| 54 | + sourceRepos: |
| 55 | + - '*' |
| 56 | + destinations: |
| 57 | + - namespace: '*' |
| 58 | + server: '*' |
| 59 | + sourceNamespaces: |
| 60 | + - image-updater-e2e-006-01 |
| 61 | +--- |
| 62 | +apiVersion: kuttl.dev/v1beta1 |
| 63 | +kind: TestStep |
| 64 | +commands: |
| 65 | +- script: | |
| 66 | + kubectl rollout restart -n argocd-image-updater-e2e deployment argocd-server |
| 67 | + kubectl rollout restart -n argocd-image-updater-e2e statefulset argocd-application-controller |
| 68 | + sleep 30 |
| 69 | +--- |
| 70 | +apiVersion: argoproj.io/v1alpha1 |
| 71 | +kind: Application |
| 72 | +metadata: |
| 73 | + name: image-updater-006 |
| 74 | + namespace: image-updater-e2e-006-01 |
| 75 | + annotations: |
| 76 | + argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0 |
| 77 | + argocd-image-updater.argoproj.io/guestbook.update-strategy: semver |
| 78 | +spec: |
| 79 | + project: project-one |
| 80 | + source: |
| 81 | + repoURL: https://github.com/argoproj/argocd-example-apps.git |
| 82 | + path: kustomize-guestbook |
| 83 | + targetRevision: HEAD |
| 84 | + destination: |
| 85 | + server: https://kubernetes.default.svc |
| 86 | + namespace: image-updater-e2e-006-01 |
| 87 | + syncPolicy: |
| 88 | + automated: |
| 89 | + prune: true |
| 90 | + selfHeal: true |
0 commit comments