Skip to content

Commit 79e12de

Browse files
authored
Merge pull request #124 from stefanprodan/flux-2.7
Update Flux to v2.7.3
2 parents 7a33c73 + 6c74efd commit 79e12de

File tree

28 files changed

+6147
-8654
lines changed

28 files changed

+6147
-8654
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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@ 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
25+
with:
26+
cosign-release: v2.6.1
2527
- name: Login to GHCR
26-
uses: docker/login-action@v2
28+
uses: docker/login-action@v3
2729
with:
2830
registry: ghcr.io
2931
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: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,55 @@ import-crds: ## Update Flux API CUE definitions
9696
@rm crds.yaml
9797

9898
.PHONY: vendor-crds
99-
vendor-crds: ## Update Flux CRDs for Git sync
99+
vendor-crds: vendor-crds-git vendor-crds-oci vendor-crds-helm ## Update CRDs for all modules
100+
101+
.PHONY: vendor-crds-git
102+
vendor-crds-git: ## Update CRDs for flux-git-sync module
100103
@cd modules/flux-git-sync
101104
@timoni mod vendor crds -f https://github.com/fluxcd/flux2/releases/download/$(VERSION)/install.yaml
102105
@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
106+
@rm -rf image.toolkit.fluxcd.io \
107+
helm.toolkit.fluxcd.io \
108+
notification.toolkit.fluxcd.io \
109+
kustomize.toolkit.fluxcd.io/kustomization/v1beta2 \
110+
source.toolkit.fluxcd.io/gitrepository/v1beta2 \
111+
source.toolkit.fluxcd.io/bucket \
112+
source.toolkit.fluxcd.io/ocirepository \
113+
source.toolkit.fluxcd.io/helmrepository \
114+
source.toolkit.fluxcd.io/helmchart \
115+
source.toolkit.fluxcd.io/externalartifact
116+
117+
.PHONY: vendor-crds-oci
118+
vendor-crds-oci: ## Update CRDs for flux-oci-sync module
119+
@cd modules/flux-oci-sync
120+
@timoni mod vendor crds -f https://github.com/fluxcd/flux2/releases/download/$(VERSION)/install.yaml
121+
@cd cue.mod/gen
122+
@rm -rf image.toolkit.fluxcd.io \
123+
helm.toolkit.fluxcd.io \
124+
notification.toolkit.fluxcd.io \
125+
kustomize.toolkit.fluxcd.io/kustomization/v1beta2 \
126+
source.toolkit.fluxcd.io/ocirepository/v1beta2 \
127+
source.toolkit.fluxcd.io/bucket \
128+
source.toolkit.fluxcd.io/gitrepository \
129+
source.toolkit.fluxcd.io/helmrepository \
130+
source.toolkit.fluxcd.io/helmchart \
131+
source.toolkit.fluxcd.io/externalartifact
132+
133+
.PHONY: vendor-crds-helm
134+
vendor-crds-helm: ## Update CRDs for flux-helm-release module
135+
@cd modules/flux-helm-release
136+
@timoni mod vendor crds -f https://github.com/fluxcd/flux2/releases/download/$(VERSION)/install.yaml
137+
@cd cue.mod/gen
138+
@rm -rf image.toolkit.fluxcd.io \
139+
kustomize.toolkit.fluxcd.io \
140+
notification.toolkit.fluxcd.io \
141+
helm.toolkit.fluxcd.io/helmrelease/v2beta2 \
142+
source.toolkit.fluxcd.io/ocirepository/v1beta2 \
143+
source.toolkit.fluxcd.io/helmrepository/v1beta2 \
144+
source.toolkit.fluxcd.io/helmchart/v1beta2 \
145+
source.toolkit.fluxcd.io/bucket \
146+
source.toolkit.fluxcd.io/gitrepository \
147+
source.toolkit.fluxcd.io/externalartifact
107148

108149
.PHONY: list-images
109150
list-images:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# flux-aio
22

3-
[![flux](https://img.shields.io/badge/flux-v2.6.4-9cf)](https://fluxcd.io)
3+
[![flux](https://img.shields.io/badge/flux-v2.7.3-9cf)](https://fluxcd.io)
44
[![test](https://github.com/stefanprodan/flux-aio/workflows/test/badge.svg)](https://github.com/stefanprodan/flux-aio/actions)
55
[![license](https://img.shields.io/github/license/stefanprodan/flux-aio.svg)](https://github.com/stefanprodan/flux-aio/blob/main/LICENSE)
66
[![release](https://img.shields.io/github/release/stefanprodan/flux-aio/all.svg)](https://github.com/stefanprodan/flux-aio/releases)
@@ -18,7 +18,7 @@ This distribution is optimized for running [Flux](https://fluxcd.io) on:
1818
- Serverless clusters for cost optimisation (EKS Fargate)
1919

2020
The versioning of this distribution follows semver with the following format:
21-
`<flux version>-<distribution release number>`, e.g. `2.6.4-0`.
21+
`<flux version>-<distribution release number>`, e.g. `2.7.3-0`.
2222

2323
## Documentation
2424

modules/flux-aio/README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ The communication between controllers happens on the loopback interface, hence
99
Flux can function on clusters which don't have a CNI plugin installed.
1010
This allows Kubernetes operators to setup their clusters networking in a GitOps way.
1111

12+
When running Flux AIO on the host network, the following ports must be available:
13+
14+
- **Source Controller**: 9790-9792 (artifacts, metrics, health)
15+
- **Source Watcher**: 9691-9693 (artifacts, metrics, health)
16+
- **Kustomize Controller**: 9793-9794 (metrics, health)
17+
- **Helm Controller**: 9795-9796 (metrics, health)
18+
- **Notification Controller**: 9690, 9797-9799 (events, webhook, metrics, health)
19+
1220
### Prerequisites
1321

1422
Install the Timoni CLI with:
@@ -100,15 +108,19 @@ flux -n flux-system uninstall
100108
| `controllers: helm: enabled` | `bool` | `true` | Include the `helm-controller` component |
101109
| `controllers: helm: image:` | `timoniv1.#Image` | `repository: "ghcr.io/fluxcd/source-controller"` | Container image, tag and digest |
102110
| `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` |
111+
| `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` |
104112
| `controllers: kustomize: enabled` | `bool` | `true` | Include the `kustomize-controller` component |
105113
| `controllers: kustomize: image:` | `timoniv1.#Image` | `repository: "ghcr.io/fluxcd/kustomize-controller"` | Container image, tag and digest |
106114
| `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` |
115+
| `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` |
108116
| `controllers: notification: enabled` | `bool` | `true` | Include the `notification-controller` component |
109117
| `controllers: notification: image:` | `timoniv1.#Image` | `repository: "ghcr.io/fluxcd/notification-controller"` | Container image, tag and digest |
110118
| `controllers: notification: resources` | `corev1.#ResourceRequirements` | `null` | Set resource requests and limits specific for the `notification-controller` container |
111119
| `controllers: notification: featureGates` | `string` | `""` | Set controller [feature gates](https://fluxcd.io/flux/components/notification/options/#feature-gates) e.g. `ObjectLevelWorkloadIdentity=true` |
120+
| `controllers: watcher: enabled` | `bool` | `true` | Include the `source-watcher` component |
121+
| `controllers: watcher: image:` | `timoniv1.#Image` | `repository: "ghcr.io/fluxcd/source-watcher"` | Container image, tag and digest |
122+
| `controllers: watcher: resources` | `corev1.#ResourceRequirements` | `null` | Set resource requests and limits specific for the `source-watcher` container |
123+
| `controllers: watcher: featureGates` | `string` | `""` | Set controller [feature gates](https://fluxcd.io/flux/components/source/options/) |
112124
| `expose: webhookReceiver:` | `bool` | `false` | Create the `webhook-reciver` Kubernetes Service |
113125
| `expose: notificationServer:` | `bool` | `false` | Create the `notification-controller` Kubernetes Service |
114126
| `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)