mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-07 16:27:27 +00:00
Merge pull request #5614 from fluxcd/conform-source-watcher
ci: Include source-watcher in the e2e test suite
This commit is contained in:
commit
26a8d0c1c7
8 changed files with 74 additions and 10 deletions
8
.github/workflows/conformance.yaml
vendored
8
.github/workflows/conformance.yaml
vendored
|
|
@ -76,7 +76,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
# Keep this list up-to-date with https://endoflife.date/kubernetes
|
# Keep this list up-to-date with https://endoflife.date/kubernetes
|
||||||
# Available versions can be found with "replicated cluster versions"
|
# Available versions can be found with "replicated cluster versions"
|
||||||
K3S_VERSION: [ 1.32.8, 1.33.4 ]
|
K3S_VERSION: [ 1.32.9, 1.33.5, 1.34.1 ]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -120,8 +120,7 @@ jobs:
|
||||||
run: TEST_KUBECONFIG=${{ steps.prep.outputs.kubeconfig-path }} make e2e
|
run: TEST_KUBECONFIG=${{ steps.prep.outputs.kubeconfig-path }} make e2e
|
||||||
- name: Run flux bootstrap
|
- name: Run flux bootstrap
|
||||||
run: |
|
run: |
|
||||||
./bin/flux bootstrap git --manifests ./manifests/install/ \
|
./bin/flux bootstrap git --manifests ./manifests/test/ \
|
||||||
--components-extra=image-reflector-controller,image-automation-controller \
|
|
||||||
--url=https://github.com/fluxcd-testing/${{ steps.prep.outputs.cluster }} \
|
--url=https://github.com/fluxcd-testing/${{ steps.prep.outputs.cluster }} \
|
||||||
--branch=main \
|
--branch=main \
|
||||||
--path=clusters/k3s \
|
--path=clusters/k3s \
|
||||||
|
|
@ -169,7 +168,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# Keep this list up-to-date with https://endoflife.date/red-hat-openshift
|
# Keep this list up-to-date with https://endoflife.date/red-hat-openshift
|
||||||
OPENSHIFT_VERSION: [ 4.19.0-okd ]
|
OPENSHIFT_VERSION: [ 4.19.0-okd, 4.20.0-okd ]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -212,7 +211,6 @@ jobs:
|
||||||
- name: Run flux bootstrap
|
- name: Run flux bootstrap
|
||||||
run: |
|
run: |
|
||||||
./bin/flux bootstrap git --manifests ./manifests/openshift/ \
|
./bin/flux bootstrap git --manifests ./manifests/openshift/ \
|
||||||
--components-extra=image-reflector-controller,image-automation-controller \
|
|
||||||
--url=https://github.com/fluxcd-testing/${{ steps.prep.outputs.cluster }} \
|
--url=https://github.com/fluxcd-testing/${{ steps.prep.outputs.cluster }} \
|
||||||
--branch=main \
|
--branch=main \
|
||||||
--path=clusters/openshift \
|
--path=clusters/openshift \
|
||||||
|
|
|
||||||
8
.github/workflows/e2e-bootstrap.yaml
vendored
8
.github/workflows/e2e-bootstrap.yaml
vendored
|
|
@ -51,7 +51,7 @@ jobs:
|
||||||
echo "test_repo_name=$TEST_REPO_NAME" >> $GITHUB_OUTPUT
|
echo "test_repo_name=$TEST_REPO_NAME" >> $GITHUB_OUTPUT
|
||||||
- name: bootstrap init
|
- name: bootstrap init
|
||||||
run: |
|
run: |
|
||||||
./bin/flux bootstrap github --manifests ./manifests/install/ \
|
./bin/flux bootstrap github --manifests ./manifests/test/ \
|
||||||
--owner=fluxcd-testing \
|
--owner=fluxcd-testing \
|
||||||
--image-pull-secret=ghcr-auth \
|
--image-pull-secret=ghcr-auth \
|
||||||
--registry-creds=fluxcd:$GITHUB_TOKEN \
|
--registry-creds=fluxcd:$GITHUB_TOKEN \
|
||||||
|
|
@ -66,7 +66,7 @@ jobs:
|
||||||
kubectl -n flux-system get secret ghcr-auth | grep dockerconfigjson
|
kubectl -n flux-system get secret ghcr-auth | grep dockerconfigjson
|
||||||
- name: bootstrap no-op
|
- name: bootstrap no-op
|
||||||
run: |
|
run: |
|
||||||
./bin/flux bootstrap github --manifests ./manifests/install/ \
|
./bin/flux bootstrap github --manifests ./manifests/test/ \
|
||||||
--owner=fluxcd-testing \
|
--owner=fluxcd-testing \
|
||||||
--image-pull-secret=ghcr-auth \
|
--image-pull-secret=ghcr-auth \
|
||||||
--repository=${{ steps.vars.outputs.test_repo_name }} \
|
--repository=${{ steps.vars.outputs.test_repo_name }} \
|
||||||
|
|
@ -78,7 +78,7 @@ jobs:
|
||||||
- name: bootstrap customize
|
- name: bootstrap customize
|
||||||
run: |
|
run: |
|
||||||
make setup-bootstrap-patch
|
make setup-bootstrap-patch
|
||||||
./bin/flux bootstrap github --manifests ./manifests/install/ \
|
./bin/flux bootstrap github --manifests ./manifests/test/ \
|
||||||
--owner=fluxcd-testing \
|
--owner=fluxcd-testing \
|
||||||
--repository=${{ steps.vars.outputs.test_repo_name }} \
|
--repository=${{ steps.vars.outputs.test_repo_name }} \
|
||||||
--branch=main \
|
--branch=main \
|
||||||
|
|
@ -98,7 +98,7 @@ jobs:
|
||||||
- name: test image automation
|
- name: test image automation
|
||||||
run: |
|
run: |
|
||||||
make setup-image-automation
|
make setup-image-automation
|
||||||
./bin/flux bootstrap github --manifests ./manifests/install/ \
|
./bin/flux bootstrap github --manifests ./manifests/test/ \
|
||||||
--owner=fluxcd-testing \
|
--owner=fluxcd-testing \
|
||||||
--repository=${{ steps.vars.outputs.test_repo_name }} \
|
--repository=${{ steps.vars.outputs.test_repo_name }} \
|
||||||
--branch=main \
|
--branch=main \
|
||||||
|
|
|
||||||
2
.github/workflows/e2e.yaml
vendored
2
.github/workflows/e2e.yaml
vendored
|
|
@ -65,7 +65,7 @@ jobs:
|
||||||
./bin/flux check --pre
|
./bin/flux check --pre
|
||||||
- name: flux install --manifests
|
- name: flux install --manifests
|
||||||
run: |
|
run: |
|
||||||
./bin/flux install --manifests ./manifests/install/
|
./bin/flux install --manifests ./manifests/test/
|
||||||
- name: flux create secret
|
- name: flux create secret
|
||||||
run: |
|
run: |
|
||||||
./bin/flux create secret git git-ssh-test \
|
./bin/flux create secret git git-ssh-test \
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- scc.yaml
|
- scc.yaml
|
||||||
- ../bases/source-controller
|
- ../bases/source-controller
|
||||||
|
- ../bases/source-watcher
|
||||||
- ../bases/kustomize-controller
|
- ../bases/kustomize-controller
|
||||||
- ../bases/notification-controller
|
- ../bases/notification-controller
|
||||||
- ../bases/helm-controller
|
- ../bases/helm-controller
|
||||||
|
|
@ -17,6 +18,8 @@ transformers:
|
||||||
images:
|
images:
|
||||||
- name: fluxcd/source-controller
|
- name: fluxcd/source-controller
|
||||||
newName: ghcr.io/fluxcd/source-controller
|
newName: ghcr.io/fluxcd/source-controller
|
||||||
|
- name: fluxcd/source-watcher
|
||||||
|
newName: ghcr.io/fluxcd/source-watcher
|
||||||
- name: fluxcd/kustomize-controller
|
- name: fluxcd/kustomize-controller
|
||||||
newName: ghcr.io/fluxcd/kustomize-controller
|
newName: ghcr.io/fluxcd/kustomize-controller
|
||||||
- name: fluxcd/helm-controller
|
- name: fluxcd/helm-controller
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@ subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: source-controller
|
name: source-controller
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: source-watcher
|
||||||
|
namespace: flux-system
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: kustomize-controller
|
name: kustomize-controller
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
|
|
|
||||||
40
manifests/test/kustomization.yaml
Normal file
40
manifests/test/kustomization.yaml
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
# This overlay is used in end-to-end tests and contains all optional controllers.
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: flux-system
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- ../bases/source-controller
|
||||||
|
- ../bases/source-watcher
|
||||||
|
- ../bases/kustomize-controller
|
||||||
|
- ../bases/notification-controller
|
||||||
|
- ../bases/helm-controller
|
||||||
|
- ../bases/image-reflector-controller
|
||||||
|
- ../bases/image-automation-controller
|
||||||
|
- ../rbac
|
||||||
|
- ../policies
|
||||||
|
transformers:
|
||||||
|
- labels.yaml
|
||||||
|
images:
|
||||||
|
- name: fluxcd/source-controller
|
||||||
|
newName: ghcr.io/fluxcd/source-controller
|
||||||
|
- name: fluxcd/source-watcher
|
||||||
|
newName: ghcr.io/fluxcd/source-watcher
|
||||||
|
- name: fluxcd/kustomize-controller
|
||||||
|
newName: ghcr.io/fluxcd/kustomize-controller
|
||||||
|
- name: fluxcd/helm-controller
|
||||||
|
newName: ghcr.io/fluxcd/helm-controller
|
||||||
|
- name: fluxcd/notification-controller
|
||||||
|
newName: ghcr.io/fluxcd/notification-controller
|
||||||
|
- name: fluxcd/image-reflector-controller
|
||||||
|
newName: ghcr.io/fluxcd/image-reflector-controller
|
||||||
|
- name: fluxcd/image-automation-controller
|
||||||
|
newName: ghcr.io/fluxcd/image-automation-controller
|
||||||
|
patches:
|
||||||
|
- target:
|
||||||
|
kind: Deployment
|
||||||
|
name: "(kustomize-controller|helm-controller)"
|
||||||
|
patch: |-
|
||||||
|
- op: add
|
||||||
|
path: /spec/template/spec/containers/0/args/-
|
||||||
|
value: --feature-gates=ExternalArtifact=true
|
||||||
13
manifests/test/labels.yaml
Normal file
13
manifests/test/labels.yaml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
apiVersion: builtin
|
||||||
|
kind: LabelTransformer
|
||||||
|
metadata:
|
||||||
|
name: labels
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/part-of: flux
|
||||||
|
app.kubernetes.io/instance: flux-system
|
||||||
|
fieldSpecs:
|
||||||
|
- path: metadata/labels
|
||||||
|
create: true
|
||||||
|
- kind: Deployment
|
||||||
|
path: spec/template/metadata/labels
|
||||||
|
create: true
|
||||||
7
manifests/test/namespace.yaml
Normal file
7
manifests/test/namespace.yaml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: flux-system
|
||||||
|
labels:
|
||||||
|
pod-security.kubernetes.io/warn: restricted
|
||||||
|
pod-security.kubernetes.io/warn-version: latest
|
||||||
Loading…
Reference in a new issue