trying out argocd bootstrapping
This commit is contained in:
		
							
								
								
									
										22
									
								
								.github/workflows/auto-pr.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								.github/workflows/auto-pr.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -1,22 +0,0 @@ | |||||||
| name: Staging Auto-PR |  | ||||||
| on: |  | ||||||
|   create: |  | ||||||
|     branches: ['ci-update'] |  | ||||||
|  |  | ||||||
| jobs: |  | ||||||
|   pull-request: |  | ||||||
|     name: Open PR to main |  | ||||||
|     runs-on: ubuntu-latest |  | ||||||
|     steps: |  | ||||||
|     - uses: actions/checkout@v3 |  | ||||||
|       name: checkout |  | ||||||
|  |  | ||||||
|     - uses: repo-sync/pull-request@v2 |  | ||||||
|       name: pull-request |  | ||||||
|       with: |  | ||||||
|         destination_branch: "main" |  | ||||||
|         pr_title: "Pulling ${{ github.ref }} into main" |  | ||||||
|         pr_body: "👑 *An automated PR*" |  | ||||||
|         pr_reviewer: "kingdonb" |  | ||||||
|         pr_draft: true |  | ||||||
|         github_token: ${{ secrets.GITHUB_TOKEN }} |  | ||||||
							
								
								
									
										15
									
								
								infrastructure/argocd-imageupdate/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								infrastructure/argocd-imageupdate/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | |||||||
|  | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
|  | kind: Kustomization | ||||||
|  |  | ||||||
|  | namespace: argocd | ||||||
|  |  | ||||||
|  |  | ||||||
|  | resources: | ||||||
|  |   - https://github.com/argoproj-labs/argocd-image-updater/manifests/base | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # patches: | ||||||
|  | #   - path: ./restic-commands.yaml | ||||||
|  | #     target: | ||||||
|  | #       kind: CronJob | ||||||
|  |        | ||||||
							
								
								
									
										14
									
								
								infrastructure/argocd/argo-apps.application.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								infrastructure/argocd/argo-apps.application.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | |||||||
|  | apiVersion: argoproj.io/v1alpha1 | ||||||
|  | kind: Application | ||||||
|  | metadata: | ||||||
|  |   name: argo-apps | ||||||
|  |   namespace: argocd | ||||||
|  | spec: | ||||||
|  |   project: default | ||||||
|  |   source: | ||||||
|  |     repoURL: https://github.com/moll-re/k3s-infra.git | ||||||
|  |     targetRevision: HEAD | ||||||
|  |     path: kluster-deployments | ||||||
|  |   destination: | ||||||
|  |     server: https://kubernetes.default.svc | ||||||
|  |     namespace: argocd | ||||||
							
								
								
									
										19
									
								
								infrastructure/argocd/ingress.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								infrastructure/argocd/ingress.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | |||||||
|  | --- | ||||||
|  | apiVersion: traefik.containo.us/v1alpha1 | ||||||
|  | kind: IngressRoute | ||||||
|  | metadata: | ||||||
|  |     name: argocd-ingressroute | ||||||
|  |  | ||||||
|  | spec: | ||||||
|  |     entryPoints: | ||||||
|  |         - websecure | ||||||
|  |     routes: | ||||||
|  |  | ||||||
|  |         - match: Host(`argocd.kluster.moll.re`) | ||||||
|  |           kind: Rule | ||||||
|  |           services: | ||||||
|  |               - name: argocd-server | ||||||
|  |                 port: 443 | ||||||
|  |  | ||||||
|  |     tls: | ||||||
|  |         certResolver: default-tls | ||||||
							
								
								
									
										9
									
								
								infrastructure/argocd/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								infrastructure/argocd/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | |||||||
|  | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
|  | kind: Kustomization | ||||||
|  |  | ||||||
|  | namespace: argocd | ||||||
|  | resources: | ||||||
|  | - https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml | ||||||
|  | - namespace.yaml | ||||||
|  | - ingress.yaml | ||||||
|  | - argo-apps.application.yaml | ||||||
							
								
								
									
										4
									
								
								infrastructure/argocd/namespace.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								infrastructure/argocd/namespace.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | |||||||
|  | apiVersion: v1 | ||||||
|  | kind: Namespace | ||||||
|  | metadata: | ||||||
|  |   name: argocd | ||||||
							
								
								
									
										97
									
								
								kluster-deployments/immich/deploymentereference.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										97
									
								
								kluster-deployments/immich/deploymentereference.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,97 @@ | |||||||
|  | apiVersion: source.toolkit.fluxcd.io/v1beta2 | ||||||
|  | kind: HelmRepository | ||||||
|  | metadata: | ||||||
|  |   name: immich-helmrepo | ||||||
|  |   namespace: flux-system | ||||||
|  | spec: | ||||||
|  |   interval: 60m0s | ||||||
|  |   url: https://immich-app.github.io/immich-charts | ||||||
|  | --- | ||||||
|  | apiVersion: helm.toolkit.fluxcd.io/v2beta1 | ||||||
|  | kind: HelmRelease | ||||||
|  | metadata: | ||||||
|  |   name: immich-helmchart | ||||||
|  |   namespace: flux-system | ||||||
|  | spec: | ||||||
|  |   interval: 5m0s | ||||||
|  |   chart: | ||||||
|  |     spec: | ||||||
|  |       chart: immich | ||||||
|  |       sourceRef: | ||||||
|  |         kind: HelmRepository | ||||||
|  |         name: immich-helmrepo | ||||||
|  |       valuesFiles: | ||||||
|  |         - ./apps/immich/values.yaml | ||||||
|  |   #       - values-production.yaml | ||||||
|  |   # values: ./apps/immich/values.yaml | ||||||
|  | --- | ||||||
|  | apiVersion: image.toolkit.fluxcd.io/v1beta2 | ||||||
|  | kind: ImageRepository | ||||||
|  | metadata: | ||||||
|  |   name: immich-registry | ||||||
|  |   namespace: flux-system | ||||||
|  | spec: | ||||||
|  |   image: ghcr.io/immich-app/immich-server | ||||||
|  |   interval: 15m | ||||||
|  | --- | ||||||
|  | apiVersion: image.toolkit.fluxcd.io/v1beta2 | ||||||
|  | kind: ImagePolicy | ||||||
|  | metadata: | ||||||
|  |   name: immich-imagerange | ||||||
|  |   namespace: flux-system | ||||||
|  | spec: | ||||||
|  |   imageRepositoryRef: | ||||||
|  |     name: immich-registry | ||||||
|  |   policy: | ||||||
|  |     semver: | ||||||
|  |       range: 1.x.x | ||||||
|  | --- | ||||||
|  | apiVersion: image.toolkit.fluxcd.io/v1beta1 | ||||||
|  | kind: ImageUpdateAutomation | ||||||
|  | metadata: | ||||||
|  |   name: immich-automation | ||||||
|  |   namespace: flux-system | ||||||
|  | spec: | ||||||
|  |   interval: 30m | ||||||
|  |   sourceRef: | ||||||
|  |     kind: GitRepository | ||||||
|  |     name: flux-system | ||||||
|  |   #### Git configuration | ||||||
|  |   git: | ||||||
|  |     checkout: | ||||||
|  |       ref: | ||||||
|  |         branch: main | ||||||
|  |     commit: | ||||||
|  |       author: | ||||||
|  |         email: flux@moll.re | ||||||
|  |         name: fluxcdbot | ||||||
|  |       messageTemplate: 'Bump {{range .Updated.Images}}{{println .}}{{end}}' | ||||||
|  |     push: | ||||||
|  |       #### Branch to push to | ||||||
|  |       branch: ci-update | ||||||
|  |   #### Update configuration | ||||||
|  |   update: | ||||||
|  |     #### Path to the file to update | ||||||
|  |     path: ./apps/immich/values.yaml | ||||||
|  |     #### Update strategy | ||||||
|  |     strategy: Setters | ||||||
|  | --- | ||||||
|  |  | ||||||
|  |  | ||||||
|  |   # sourceRef: | ||||||
|  |   #   kind: GitRepository | ||||||
|  |   #   name: immich | ||||||
|  |   # git: | ||||||
|  |   #   checkout: | ||||||
|  |   #     ref: | ||||||
|  |   #       branch: main | ||||||
|  |   #   commit: | ||||||
|  |   #     author: | ||||||
|  |   #       email: flux@moll.re | ||||||
|  |   #       name: fluxcdbot | ||||||
|  |   #     messageTemplate: '[CI SKIP] Bump {{range .Updated.Images}}{{println .}}{{end}}' | ||||||
|  |   #   push: | ||||||
|  |   #     branch: main | ||||||
|  |   # update: | ||||||
|  |   #   path: ./deployment/base/deployment.yaml | ||||||
|  |   #   strategy: Setters | ||||||
| @@ -1,5 +1,8 @@ | |||||||
| apiVersion: kustomize.config.k8s.io/v1beta1 | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
| kind: Kustomization | kind: Kustomization | ||||||
|  | 
 | ||||||
|  | namespace: argocd | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| resources: | resources: | ||||||
| - gotk-components.yaml |   - whoami/application.yaml | ||||||
| - gotk-sync.yaml |  | ||||||
							
								
								
									
										14
									
								
								kluster-deployments/whoami/application.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								kluster-deployments/whoami/application.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | |||||||
|  | apiVersion: argoproj.io/v1alpha1 | ||||||
|  | kind: Application | ||||||
|  | metadata: | ||||||
|  |   name: whoami-application | ||||||
|  |   namespace: argocd | ||||||
|  | spec: | ||||||
|  |   project: default | ||||||
|  |   source: | ||||||
|  |     repoURL: https://github.com/moll-re/k3s-infra.git | ||||||
|  |     targetRevision: HEAD | ||||||
|  |     path: apps/whoami | ||||||
|  |   destination: | ||||||
|  |     server: https://kubernetes.default.svc | ||||||
|  |     namespace: whoami | ||||||
| @@ -1,56 +0,0 @@ | |||||||
| apiVersion: source.toolkit.fluxcd.io/v1beta2 |  | ||||||
| kind: HelmRepository |  | ||||||
| metadata: |  | ||||||
|   annotations: |  | ||||||
|     metadata.weave.works/description: This is the source location for the Weave GitOps |  | ||||||
|       Dashboard's helm chart. |  | ||||||
|   labels: |  | ||||||
|     app.kubernetes.io/component: ui |  | ||||||
|     app.kubernetes.io/created-by: weave-gitops-cli |  | ||||||
|     app.kubernetes.io/name: weave-gitops-dashboard |  | ||||||
|     app.kubernetes.io/part-of: weave-gitops |  | ||||||
|   name: flux-dashboard |  | ||||||
|   namespace: flux-system |  | ||||||
| spec: |  | ||||||
|   interval: 1h0m0s |  | ||||||
|   type: oci |  | ||||||
|   url: oci://ghcr.io/weaveworks/charts |  | ||||||
| --- |  | ||||||
| apiVersion: helm.toolkit.fluxcd.io/v2beta1 |  | ||||||
| kind: HelmRelease |  | ||||||
| metadata: |  | ||||||
|   annotations: |  | ||||||
|     metadata.weave.works/description: This is the Weave GitOps Dashboard.  It provides |  | ||||||
|       a simple way to get insights into your GitOps workloads. |  | ||||||
|   name: flux-dashboard |  | ||||||
|   namespace: flux-system |  | ||||||
| spec: |  | ||||||
|   chart: |  | ||||||
|     spec: |  | ||||||
|       chart: weave-gitops |  | ||||||
|       sourceRef: |  | ||||||
|         kind: HelmRepository |  | ||||||
|         name: flux-dashboard |  | ||||||
|   interval: 1h0m0s |  | ||||||
|   values: |  | ||||||
|     adminUser: |  | ||||||
|       create: true |  | ||||||
|       passwordHash: $2a$10$k0UXfoFU9qbQQYOD/fJWY.Wlr5z9YVTyC0WrnOk50QhKuo1Y0SZoK |  | ||||||
|       username: admin |  | ||||||
| # --- |  | ||||||
| # apiVersion: traefik.containo.us/v1alpha1 |  | ||||||
| # kind: IngressRoute |  | ||||||
| # metadata: |  | ||||||
| #   namespace: flux-system |  | ||||||
| #   name: flux-ingressroute |  | ||||||
| # spec: |  | ||||||
| #   entryPoints: |  | ||||||
| #     - websecure |  | ||||||
| #   routes: |  | ||||||
| #   - match: Host(`flux.kluster.moll.re`) |  | ||||||
| #     kind: Rule |  | ||||||
| #     services: |  | ||||||
| #     - name: flux-dashboard-weave-gitops |  | ||||||
| #       port: 9001 |  | ||||||
| #   tls: |  | ||||||
| #     certResolver: default-tls |  | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1,27 +0,0 @@ | |||||||
| # This manifest was generated by flux. DO NOT EDIT. |  | ||||||
| --- |  | ||||||
| apiVersion: source.toolkit.fluxcd.io/v1 |  | ||||||
| kind: GitRepository |  | ||||||
| metadata: |  | ||||||
|   name: flux-system |  | ||||||
|   namespace: flux-system |  | ||||||
| spec: |  | ||||||
|   interval: 1m0s |  | ||||||
|   ref: |  | ||||||
|     branch: main |  | ||||||
|   secretRef: |  | ||||||
|     name: flux-system |  | ||||||
|   url: ssh://git@github.com/moll-re/k3s-infra |  | ||||||
| --- |  | ||||||
| apiVersion: kustomize.toolkit.fluxcd.io/v1 |  | ||||||
| kind: Kustomization |  | ||||||
| metadata: |  | ||||||
|   name: flux-system |  | ||||||
|   namespace: flux-system |  | ||||||
| spec: |  | ||||||
|   interval: 10m0s |  | ||||||
|   path: ./kluster |  | ||||||
|   prune: true |  | ||||||
|   sourceRef: |  | ||||||
|     kind: GitRepository |  | ||||||
|     name: flux-system |  | ||||||
| @@ -1,13 +0,0 @@ | |||||||
| apiVersion: kustomize.toolkit.fluxcd.io/v1 |  | ||||||
| kind: Kustomization |  | ||||||
| metadata: |  | ||||||
|   name: whoami-kustomize |  | ||||||
|   namespace: flux-system |  | ||||||
| spec: |  | ||||||
|   force: true |  | ||||||
|   interval: 1m0s |  | ||||||
|   path: ./apps/whoami/overlays/main |  | ||||||
|   prune: false |  | ||||||
|   sourceRef: |  | ||||||
|     kind: GitRepository |  | ||||||
|     name: flux-system |  | ||||||
		Reference in New Issue
	
	Block a user