-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite pipeline selection to serially build cluster #266
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- tests/testdata/cluster3/tenants/overlays/cluster3 Kustomization: flux-system/tenants Namespace: flux-system/app
+++ tests/testdata/cluster3/tenants/overlays/cluster3 Kustomization: flux-system/tenants Namespace: flux-system/app
@@ -0,0 +1,6 @@
+---
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: app
+
--- tests/testdata/cluster3/namespaces/overlays/cluster3 Kustomization: flux-system/namespaces Namespace: flux-system/podinfo
+++ tests/testdata/cluster3/namespaces/overlays/cluster3 Kustomization: flux-system/namespaces Namespace: flux-system/podinfo
@@ -0,0 +1,6 @@
+---
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: podinfo
+ |
--- tests/testdata/cluster5 Kustomization: controllers/infra-controllers HelmRepository: flux-system/bitnami
+++ tests/testdata/cluster5 Kustomization: controllers/infra-controllers HelmRepository: flux-system/bitnami
@@ -0,0 +1,11 @@
+---
+apiVersion: source.toolkit.fluxcd.io/v1beta2
+kind: HelmRepository
+metadata:
+ name: bitnami
+ namespace: flux-system
+spec:
+ interval: 30m
+ type: oci
+ url: oci://registry-1.docker.io/bitnamicharts
+
--- tests/testdata/cluster5 Kustomization: controllers/infra-controllers HelmRepository: flux-system/weave-charts
+++ tests/testdata/cluster5 Kustomization: controllers/infra-controllers HelmRepository: flux-system/weave-charts
@@ -0,0 +1,10 @@
+---
+apiVersion: source.toolkit.fluxcd.io/v1beta2
+kind: HelmRepository
+metadata:
+ name: weave-charts
+ namespace: flux-system
+spec:
+ interval: 1h
+ url: https://helm.gitops.weave.works
+ |
no HelmRelease objects found in cluster |
--- tests/testdata/cluster6/cluster HelmRelease: default/renovate ServiceAccount: default/renovate
+++ tests/testdata/cluster6/cluster HelmRelease: default/renovate ServiceAccount: default/renovate
@@ -0,0 +1,10 @@
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: renovate
+ labels:
+ app.kubernetes.io/name: renovate
+ app.kubernetes.io/instance: renovate
+ app.kubernetes.io/managed-by: Helm
+
--- tests/testdata/cluster6/cluster HelmRelease: default/renovate CronJob: default/renovate
+++ tests/testdata/cluster6/cluster HelmRelease: default/renovate CronJob: default/renovate
@@ -0,0 +1,54 @@
+---
+apiVersion: batch/v1
+kind: CronJob
+metadata:
+ name: renovate
+ labels:
+ app.kubernetes.io/name: renovate
+ app.kubernetes.io/instance: renovate
+ app.kubernetes.io/managed-by: Helm
+spec:
+ schedule: 0 1 * * *
+ jobTemplate:
+ metadata:
+ labels:
+ app.kubernetes.io/name: renovate
+ app.kubernetes.io/instance: renovate
+ spec:
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/name: renovate
+ app.kubernetes.io/instance: renovate
+ spec:
+ serviceAccountName: renovate
+ restartPolicy: Never
+ containers:
+ - name: renovate
+ image: renovate/renovate:35.159.7
+ imagePullPolicy: IfNotPresent
+ env:
+ - name: RENOVATE_CONFIG_FILE
+ value: /dev/null
+ envFrom: null
+ securityContext:
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
+ resources:
+ limits:
+ cpu: 1000m
+ memory: 2G
+ requests:
+ cpu: 100m
+ memory: 256Mi
+ volumes: null
+ securityContext:
+ fsGroup: 1000
+ fsGroupChangePolicy: Always
+ runAsNonRoot: true
+ runAsUser: 1000
+ seccompProfile:
+ type: RuntimeDefault
+ |
Update logic for handling flux-system Revert test changes Add valid repositories for cluster5 Include flux-system in kustomization output
--- tests/testdata/cluster6/apps Kustomization: flux-system/apps HelmRepository: flux-system/renovate
+++ tests/testdata/cluster6/apps Kustomization: flux-system/apps HelmRepository: flux-system/renovate
@@ -0,0 +1,10 @@
+---
+apiVersion: source.toolkit.fluxcd.io/v1beta2
+kind: HelmRepository
+metadata:
+ name: renovate
+ namespace: flux-system
+spec:
+ interval: 30m
+ url: https://docs.renovatebot.com/helm-charts
+
--- tests/testdata/cluster6/apps Kustomization: flux-system/apps HelmRelease: default/renovate
+++ tests/testdata/cluster6/apps Kustomization: flux-system/apps HelmRelease: default/renovate
@@ -0,0 +1,40 @@
+---
+apiVersion: helm.toolkit.fluxcd.io/v2beta1
+kind: HelmRelease
+metadata:
+ name: renovate
+ namespace: default
+spec:
+ chart:
+ spec:
+ chart: renovate
+ sourceRef:
+ kind: HelmRepository
+ name: renovate
+ namespace: flux-system
+ interval: 5m
+ values:
+ renovate:
+ existingConfigFile: /dev/null
+ securityContext:
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
+ resources:
+ limits:
+ cpu: 1000m
+ memory: 2G
+ requests:
+ cpu: 100m
+ memory: 256Mi
+ securityContext:
+ fsGroup: 1000
+ fsGroupChangePolicy: Always
+ runAsNonRoot: true
+ runAsUser: 1000
+ seccompProfile:
+ type: RuntimeDefault
+ serviceAccount:
+ create: true
+
--- tests/testdata/cluster6/cluster Kustomization: flux-system/flux-system GitRepository: flux-system/flux-system
+++ tests/testdata/cluster6/cluster Kustomization: flux-system/flux-system GitRepository: flux-system/flux-system
@@ -0,0 +1,14 @@
+---
+apiVersion: source.toolkit.fluxcd.io/v1beta1
+kind: GitRepository
+metadata:
+ name: flux-system
+ namespace: flux-system
+spec:
+ interval: 1m0s
+ ref:
+ branch: main
+ secretRef:
+ name: flux-system
+ url: ssh://[email protected]/allenporter/flux-local
+
--- tests/testdata/cluster6/cluster Kustomization: flux-system/flux-system Kustomization: flux-system/apps
+++ tests/testdata/cluster6/cluster Kustomization: flux-system/flux-system Kustomization: flux-system/apps
@@ -0,0 +1,12 @@
+---
+apiVersion: kustomize.toolkit.fluxcd.io/v1
+kind: Kustomization
+metadata:
+ name: apps
+ namespace: flux-system
+spec:
+ path: ./tests/testdata/cluster6/apps/
+ sourceRef:
+ kind: GitRepository
+ name: flux-system
+
--- tests/testdata/cluster6/cluster Kustomization: flux-system/flux-system Kustomization: flux-system/flux-system
+++ tests/testdata/cluster6/cluster Kustomization: flux-system/flux-system Kustomization: flux-system/flux-system
@@ -0,0 +1,14 @@
+---
+apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
+kind: Kustomization
+metadata:
+ name: flux-system
+ namespace: flux-system
+spec:
+ interval: 10m0s
+ path: ./tests/testdata/cluster6/cluster
+ prune: true
+ sourceRef:
+ kind: GitRepository
+ name: flux-system
+ |
no HelmRelease objects found in cluster |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an overhaul to simplify the algorithm at the expense of speed. This makes handles more complex cluster setups that the old algorithm couldn't reason about.
Issue #198