Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/src/clusters/dummy/infrastructure/flux/flux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Create flux Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: flux
spec:
# Path inside repository to a directory containing Kustomization files
path: src/clusters/dummy/infrastructure/flux/kustomize
# Apply patches for common configurations
# This key always needs to be here for patching to work
patches:
# Set target namespace
- target:
group: kustomize.toolkit.fluxcd.io
kind: Kustomization
name: .*
patch: |-
kind: .
metadata:
name: .
spec:
targetNamespace: flux-system
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Create flux-namespace Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: flux-namespace
spec:
# Path inside repository to a directory containing Kustomization files
path: src/clusters/dummy/infrastructure/flux/kustomize/flux-namespace/kustomize
# This key always needs to be here for patching to work
patches: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Create flux-namespace Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- resources/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Create flux-system namespace
apiVersion: v1
kind: Namespace
metadata:
name: flux-system
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Create flux Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- flux-namespace/flux-namespace.yaml
1 change: 1 addition & 0 deletions src/src/clusters/dummy/infrastructure/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- flux/flux.yaml
- metrics/metrics.yaml
# Apply patches for common configurations
patches:
Expand Down
3 changes: 3 additions & 0 deletions src/src/clusters/dummy/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,11 @@ patches:
mode: enabled
interval: 5m
install:
crds: CreateReplace
remediation:
retries: 3
upgrade:
cleanupOnFail: true
crds: CreateReplace
remediation:
retries: 3
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../../../../../../src/clusters/dummy/apps/podinfo/kustomize/podinfo-helm/kustomize
- ../../../../../../../../src/clusters/dummy/apps/podinfo/kustomize/podinfo-helm/kustomize
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: podinfo-helm
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/ci/dummy/apps/podinfo/kustomize/podinfo-helm/kustomize
path: tests/clusters/dummy/apps/podinfo/kustomize/podinfo-helm/kustomize
dependsOn:
# Deploy namespace first
- name: podinfo-namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../../../../../../src/clusters/dummy/apps/podinfo/kustomize/podinfo-namespace/kustomize
- ../../../../../../../../src/clusters/dummy/apps/podinfo/kustomize/podinfo-namespace/kustomize
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ metadata:
name: podinfo-namespace
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/ci/dummy/apps/podinfo/kustomize/podinfo-namespace/kustomize
path: tests/clusters/dummy/apps/podinfo/kustomize/podinfo-namespace/kustomize
# This key always needs to be here for patching to work
patches: []
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: podinfo
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/ci/dummy/apps/podinfo/kustomize
path: tests/clusters/dummy/apps/podinfo/kustomize
# Apply patches for common configurations
# This key always needs to be here for patching to work
patches:
Expand Down
22 changes: 22 additions & 0 deletions src/tests/clusters/dummy/infrastructure/flux/flux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Create flux Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: flux
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/dummy/infrastructure/flux/kustomize
# Apply patches for common configurations
# This key always needs to be here for patching to work
patches:
# Set target namespace
- target:
group: kustomize.toolkit.fluxcd.io
kind: Kustomization
name: .*
patch: |-
kind: .
metadata:
name: .
spec:
targetNamespace: flux-system
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Create flux-namespace Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: flux-namespace
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/dummy/infrastructure/flux/kustomize/flux-namespace/kustomize
# This key always needs to be here for patching to work
patches: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Overlay flux-namespace Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../../../../../src/clusters/dummy/infrastructure/flux/kustomize/flux-namespace/kustomize
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Create flux Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- flux-namespace/flux-namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Include the following resources
resources:
- flux/flux.yaml
- metrics/metrics.yaml
# Apply patches for common configurations
patches:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../../../../../../src/clusters/dummy/infrastructure/metrics/kustomize/metrics-helm/kustomize
- ../../../../../../../../src/clusters/dummy/infrastructure/metrics/kustomize/metrics-helm/kustomize
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: metrics-helm
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/ci/dummy/infrastructure/metrics/kustomize/metrics-helm/kustomize
path: tests/clusters/dummy/infrastructure/metrics/kustomize/metrics-helm/kustomize
dependsOn:
# Deploy namespace first
- name: metrics-namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../../../../../../src/clusters/dummy/infrastructure/metrics/kustomize/metrics-namespace/kustomize
- ../../../../../../../../src/clusters/dummy/infrastructure/metrics/kustomize/metrics-namespace/kustomize
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ metadata:
name: metrics-namespace
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/ci/dummy/infrastructure/metrics/kustomize/metrics-namespace/kustomize
path: tests/clusters/dummy/infrastructure/metrics/kustomize/metrics-namespace/kustomize
# This key always needs to be here for patching to work
patches: []
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: metrics
spec:
# Path inside repository to a directory containing Kustomization files
path: tests/clusters/ci/dummy/infrastructure/metrics/kustomize
path: tests/clusters/dummy/infrastructure/metrics/kustomize
# Apply patches for common configurations
# This key always needs to be here for patching to work
patches:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ patches:
mode: enabled
interval: 1m
install:
crds: CreateReplace
remediation:
retries: 3
upgrade:
cleanupOnFail: true
crds: CreateReplace
remediation:
retries: 3
8 changes: 4 additions & 4 deletions src/{% if true %}.github{% endif %}/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ jobs:
cluster_name: ${{ matrix.cluster }}
kubectl_version: v1.33.3
- name: Setup Flux
uses: fluxcd/flux2/action@v2.5.1
uses: fluxcd/flux2/action@v2.8.7
with:
version: v2.5.1
version: v2.8.7
- name: Install Flux in cluster
run: >-
flux
install
--version
v2.5.1
v2.8.7
- name: Add source to Flux
run: >-
flux
Expand All @@ -92,7 +92,7 @@ jobs:
--source
main
--path
'tests/clusters/ci/${{ matrix.cluster }}'
'tests/clusters/${{ matrix.cluster }}'
--wait
--timeout
20m
Expand Down
Loading