Skip to content

Commit bb98f86

Browse files
committed
Update Flux to v2.7.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
1 parent 7a33c73 commit bb98f86

File tree

28 files changed

+6142
-8657
lines changed

28 files changed

+6142
-8657
lines changed

.github/workflows/e2e.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- 5000:5000
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v5
3131
- name: Set up Homebrew
3232
uses: Homebrew/actions/setup-homebrew@master
3333
- name: Install tools
@@ -74,6 +74,7 @@ jobs:
7474
- name: Debug failure
7575
if: failure()
7676
run: |
77+
kubectl -n kube-system get pods
7778
kubectl -n flux-system get pods
7879
kubectl -n flux-system get gitrepository -oyaml
7980
kubectl -n flux-system get kustomization -oyaml

.github/workflows/push.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ jobs:
1515
packages: write
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v5
1919
- name: Setup Timoni
2020
uses: stefanprodan/timoni/actions/setup@main
2121
- name: Setup Flux CLI
2222
uses: fluxcd/flux2/action@main
2323
- name: Setup Cosign
2424
uses: sigstore/cosign-installer@main
2525
- name: Login to GHCR
26-
uses: docker/login-action@v2
26+
uses: docker/login-action@v3
2727
with:
2828
registry: ghcr.io
2929
username: ${{ github.actor }}

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v5
1919
- name: Set up Homebrew
2020
uses: Homebrew/actions/setup-homebrew@master
2121
- name: Install tools

Makefile

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,53 @@ import-crds: ## Update Flux API CUE definitions
9595
@cue import -f -o crds.cue -l 'strings.ToLower(kind)' -l 'metadata.name' -p templates crds.yaml
9696
@rm crds.yaml
9797

98-
.PHONY: vendor-crds
99-
vendor-crds: ## Update Flux CRDs for Git sync
98+
.PHONY: vendor-crds-git
99+
vendor-crds-git: ## Update CRDs for flux-git-sync module
100100
@cd modules/flux-git-sync
101101
@timoni mod vendor crds -f https://github.com/fluxcd/flux2/releases/download/$(VERSION)/install.yaml
102102
@cd cue.mod/gen
103-
@rm -rf image.toolkit.fluxcd.io helm.toolkit.fluxcd.io notification.toolkit.fluxcd.io
104-
@rm -rf kustomize.toolkit.fluxcd.io/kustomization/v1beta1 kustomize.toolkit.fluxcd.io/kustomization/v1beta2
105-
@rm -rf source.toolkit.fluxcd.io/gitrepository/v1beta1 source.toolkit.fluxcd.io/gitrepository/v1beta2
106-
@rm -rf source.toolkit.fluxcd.io/bucket source.toolkit.fluxcd.io/ocirepository source.toolkit.fluxcd.io/helmrepository source.toolkit.fluxcd.io/helmchart
103+
@rm -rf image.toolkit.fluxcd.io \
104+
helm.toolkit.fluxcd.io \
105+
notification.toolkit.fluxcd.io \
106+
kustomize.toolkit.fluxcd.io/kustomization/v1beta2 \
107+
source.toolkit.fluxcd.io/gitrepository/v1beta2 \
108+
source.toolkit.fluxcd.io/bucket \
109+
source.toolkit.fluxcd.io/ocirepository \
110+
source.toolkit.fluxcd.io/helmrepository \
111+
source.toolkit.fluxcd.io/helmchart \
112+
source.toolkit.fluxcd.io/externalartifact
113+
114+
.PHONY: vendor-crds-oci
115+
vendor-crds-oci: ## Update CRDs for flux-oci-sync module
116+
@cd modules/flux-oci-sync
117+
@timoni mod vendor crds -f https://github.com/fluxcd/flux2/releases/download/$(VERSION)/install.yaml
118+
@cd cue.mod/gen
119+
@rm -rf image.toolkit.fluxcd.io \
120+
helm.toolkit.fluxcd.io \
121+
notification.toolkit.fluxcd.io \
122+
kustomize.toolkit.fluxcd.io/kustomization/v1beta2 \
123+
source.toolkit.fluxcd.io/ocirepository/v1beta2 \
124+
source.toolkit.fluxcd.io/bucket \
125+
source.toolkit.fluxcd.io/gitrepository \
126+
source.toolkit.fluxcd.io/helmrepository \
127+
source.toolkit.fluxcd.io/helmchart \
128+
source.toolkit.fluxcd.io/externalartifact
129+
130+
.PHONY: vendor-crds-helm
131+
vendor-crds-helm: ## Update CRDs for flux-helm-release module
132+
@cd modules/flux-helm-release
133+
@timoni mod vendor crds -f https://github.com/fluxcd/flux2/releases/download/$(VERSION)/install.yaml
134+
@cd cue.mod/gen
135+
@rm -rf image.toolkit.fluxcd.io \
136+
kustomize.toolkit.fluxcd.io \
137+
notification.toolkit.fluxcd.io \
138+
helm.toolkit.fluxcd.io/helmrelease/v2beta2 \
139+
source.toolkit.fluxcd.io/ocirepository/v1beta2 \
140+
source.toolkit.fluxcd.io/helmrepository/v1beta2 \
141+
source.toolkit.fluxcd.io/helmchart/v1beta2 \
142+
source.toolkit.fluxcd.io/bucket \
143+
source.toolkit.fluxcd.io/gitrepository \
144+
source.toolkit.fluxcd.io/externalartifact
107145

108146
.PHONY: list-images
109147
list-images:

bundles/flux-aio.cue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,15 @@ bundle: {
1919
version: "latest"
2020
}
2121
namespace: "flux-system"
22-
values: git: {
23-
url: "https://github.com/stefanprodan/flux-aio"
24-
ref: "refs/heads/main" @timoni(runtime:string:FLUX_SYNC_REF)
25-
path: "./test/cluster-addons"
22+
values: {
23+
git: {
24+
url: "https://github.com/stefanprodan/flux-aio"
25+
ref: "refs/heads/main" @timoni(runtime:string:FLUX_SYNC_REF)
26+
path: "./test/cluster-addons"
27+
}
28+
sync: {
29+
timeout: 5
30+
}
2631
}
2732
}
2833
}

modules/flux-aio/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,19 @@ flux -n flux-system uninstall
100100
| `controllers: helm: enabled` | `bool` | `true` | Include the `helm-controller` component |
101101
| `controllers: helm: image:` | `timoniv1.#Image` | `repository: "ghcr.io/fluxcd/source-controller"` | Container image, tag and digest |
102102
| `controllers: helm: resources` | `corev1.#ResourceRequirements` | `null` | Set resource requests and limits specific for the `helm-controller` container |
103-
| `controllers: helm: featureGates` | `string` | `""` | Set controller [feature gates](https://fluxcd.io/flux/components/helm/options/#feature-gates) e.g. `DisableChartDigestTracking=true,OOMWatch=true` |
103+
| `controllers: helm: featureGates` | `string` | `"ExternalArtifact=true"` | Set controller [feature gates](https://fluxcd.io/flux/components/helm/options/#feature-gates) e.g. `DisableChartDigestTracking=true,OOMWatch=true` |
104104
| `controllers: kustomize: enabled` | `bool` | `true` | Include the `kustomize-controller` component |
105105
| `controllers: kustomize: image:` | `timoniv1.#Image` | `repository: "ghcr.io/fluxcd/kustomize-controller"` | Container image, tag and digest |
106106
| `controllers: kustomize: resources` | `corev1.#ResourceRequirements` | `null` | Set resource requests and limits specific for the `kustomize-controller` container |
107-
| `controllers: kustomize: featureGates` | `string` | `""` | Set controller [feature gates](https://fluxcd.io/flux/components/kustomize/options/#feature-gates) e.g. `StrictPostBuildSubstitutions=true,GroupChangeLog=true` |
107+
| `controllers: kustomize: featureGates` | `string` | `"ExternalArtifact=true"` | Set controller [feature gates](https://fluxcd.io/flux/components/kustomize/options/#feature-gates) e.g. `StrictPostBuildSubstitutions=true,GroupChangeLog=true` |
108108
| `controllers: notification: enabled` | `bool` | `true` | Include the `notification-controller` component |
109109
| `controllers: notification: image:` | `timoniv1.#Image` | `repository: "ghcr.io/fluxcd/notification-controller"` | Container image, tag and digest |
110110
| `controllers: notification: resources` | `corev1.#ResourceRequirements` | `null` | Set resource requests and limits specific for the `notification-controller` container |
111111
| `controllers: notification: featureGates` | `string` | `""` | Set controller [feature gates](https://fluxcd.io/flux/components/notification/options/#feature-gates) e.g. `ObjectLevelWorkloadIdentity=true` |
112+
| `controllers: watcher: enabled` | `bool` | `true` | Include the `source-watcher` component |
113+
| `controllers: watcher: image:` | `timoniv1.#Image` | `repository: "ghcr.io/fluxcd/source-watcher"` | Container image, tag and digest |
114+
| `controllers: watcher: resources` | `corev1.#ResourceRequirements` | `null` | Set resource requests and limits specific for the `source-watcher` container |
115+
| `controllers: watcher: featureGates` | `string` | `""` | Set controller [feature gates](https://fluxcd.io/flux/components/source/options/) |
112116
| `expose: webhookReceiver:` | `bool` | `false` | Create the `webhook-reciver` Kubernetes Service |
113117
| `expose: notificationServer:` | `bool` | `false` | Create the `notification-controller` Kubernetes Service |
114118
| `expose: sourceServer:` | `bool` | `false` | Create the `source-controller` Kubernetes Service |

modules/flux-aio/cue.mod/pkg/timoni.sh/core/v1alpha1/image.cue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ import (
1919
// Tag identifies an image in the repository.
2020
// A tag name may contain lowercase and uppercase characters, digits, underscores, periods and dashes.
2121
// A tag name may not start with a period or a dash and may contain a maximum of 128 characters.
22-
tag!: string & strings.MaxRunes(128)
22+
tag: *"" | string & strings.MaxRunes(128)
2323

2424
// Digest uniquely and immutably identifies an image in the repository.
2525
// Spec: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests.
26-
digest!: string
26+
digest: *"" | string
2727

2828
// PullPolicy defines the pull policy for the image.
2929
// By default, it is set to IfNotPresent.

modules/flux-aio/debug_values.cue

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ package main
66
// Eval example:
77
// cue -t debug -t name=flux -t namespace=flux-system -t mv=2.0.0 -t kv=1.28.0 eval -c -e timoni.instance.objects.deployment
88
values: {
9-
version: "v2.3.0"
9+
version: "v2.7.3"
1010
controllers: {
1111
source: {
1212
image: {
1313
repository: "ghcr.io/fluxcd/source-controller"
14-
tag: "v1.3.0"
14+
tag: "v1.7.3"
1515
digest: ""
1616
}
1717
resources: {
@@ -29,7 +29,7 @@ values: {
2929
kustomize: {
3030
image: {
3131
repository: "ghcr.io/fluxcd/kustomize-controller"
32-
tag: "v1.3.0"
32+
tag: "v1.7.2"
3333
digest: ""
3434
}
3535
resources: limits: {
@@ -40,7 +40,7 @@ values: {
4040
notification: {
4141
image: {
4242
repository: "ghcr.io/fluxcd/notification-controller"
43-
tag: "v1.3.0"
43+
tag: "v1.7.4"
4444
digest: ""
4545
}
4646
resources: limits: {
@@ -52,14 +52,20 @@ values: {
5252
helm: {
5353
image: {
5454
repository: "ghcr.io/fluxcd/helm-controller"
55-
tag: "v1.0.1"
55+
tag: "v1.4.3"
5656
digest: ""
5757
}
5858
resources: limits: {
5959
cpu: "2000m"
6060
memory: "1Gi"
6161
}
62-
featureGates: "DisableChartDigestTracking=true,OOMWatch=true"
62+
featureGates: "DisableChartDigestTracking=true,OOMWatch=true,ExternalArtifact=true"
63+
}
64+
watcher: {
65+
image: {
66+
repository: "ghcr.io/fluxcd/source-watcher"
67+
tag: "v2.0.2"
68+
}
6369
}
6470
}
6571
workload: {

modules/flux-aio/templates/config.cue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,26 @@ import (
3636
enabled: *true | bool
3737
image: timoniv1.#Image
3838
resources?: timoniv1.#ResourceRequirements
39-
featureGates: *"" | string
39+
featureGates: *"ExternalArtifact=true" | string
4040
}
4141
helm: {
4242
enabled: *true | bool
4343
image: timoniv1.#Image
4444
resources?: timoniv1.#ResourceRequirements
45-
featureGates: *"" | string
45+
featureGates: *"ExternalArtifact=true" | string
4646
}
4747
notification: {
4848
enabled: *true | bool
4949
image: timoniv1.#Image
5050
resources?: timoniv1.#ResourceRequirements
5151
featureGates: *"" | string
5252
}
53+
watcher: {
54+
enabled: *true | bool
55+
image: timoniv1.#Image
56+
resources?: timoniv1.#ResourceRequirements
57+
featureGates: *"" | string
58+
}
5359
}
5460

5561
expose: {
@@ -162,6 +168,9 @@ import (
162168
if config.controllers.notification.enabled {
163169
#NotificationController & {#config: config, _env: containerEnv}
164170
},
171+
if config.controllers.watcher.enabled {
172+
#SourceWatcher & {#config: config, _env: containerEnv}
173+
},
165174
]
166175

167176
objects: [ID=_]: runtime.#Object

0 commit comments

Comments
 (0)