Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afe0ddcd84 | ||
|
|
2c0323684c | ||
|
|
6d5ffdea57 | ||
|
|
648af6e645 | ||
|
|
e1895a4e21 | ||
|
|
d5f45800ae | ||
|
|
51f9d249ff | ||
|
|
6f525356cb | ||
|
|
5008f9064e |
@@ -56,6 +56,11 @@ export GITHUB_USER=<your-username>
|
||||
|
||||
## Install Flux
|
||||
|
||||
!!! hint "Enable image automation components"
|
||||
If you bootstrapped Flux before without the `--components-extra=` argument, you need to add
|
||||
`--components-extra=image-reflector-controller,image-automation-controller` to your
|
||||
bootstrapping routine as image automation components are not installed by default.
|
||||
|
||||
Install Flux with the image automation components:
|
||||
|
||||
```sh
|
||||
@@ -479,6 +484,7 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: ecr-credentials-sync
|
||||
namespace: flux-system
|
||||
# Uncomment and edit if using IRSA
|
||||
# annotations:
|
||||
# eks.amazonaws.com/role-arn: <role arn>
|
||||
@@ -528,8 +534,8 @@ spec:
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: SECRET_NAME
|
||||
value: <secret name> # this is the generated Secret name
|
||||
- name:
|
||||
value: ecr-credentials
|
||||
- name: ECR_REGISTRY
|
||||
value: <account id>.dkr.ecr.<region>.amazonaws.com # fill in the account id and region
|
||||
volumeMounts:
|
||||
- mountPath: /token
|
||||
@@ -558,6 +564,16 @@ you can manually create an init job using the following command:
|
||||
$ kubectl create job --from=cronjob/ecr-credentials-sync -n flux-system ecr-credentials-sync-init
|
||||
```
|
||||
|
||||
After the job runs, a secret named `ecr-credentials` should be created. Use this
|
||||
name in your ECR ImageRepository resource manifest as the value for
|
||||
`.spec.secretRef.name`.
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
secretRef:
|
||||
name: ecr-credentials
|
||||
```
|
||||
|
||||
### GCP Container Registry
|
||||
|
||||
#### Using access token [short-lived]
|
||||
@@ -636,7 +652,7 @@ spec:
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: SECRET_NAME
|
||||
value: <SECRET_NAME> # this is the generated Secret name
|
||||
value: gcr-credentials
|
||||
- name: GCR_REGISTRY
|
||||
value: <REGISTRY_NAME> # fill in the registry name e.g gcr.io, eu.gcr.io
|
||||
command:
|
||||
@@ -657,6 +673,16 @@ you can manually create an init job using the following command:
|
||||
$ kubectl create job --from=cronjob/gcr-credentials-sync -n flux-system gcr-credentials-sync-init
|
||||
```
|
||||
|
||||
After the job runs, a secret named `gcr-credentials` should be created. Use this
|
||||
name in your GCR ImageRepository resource manifest as the value for
|
||||
`.spec.secretRef.name`.
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
secretRef:
|
||||
name: gcr-credentials
|
||||
```
|
||||
|
||||
#### Using a JSON key [long-lived]
|
||||
|
||||
!!! warning "Less secure option"
|
||||
|
||||
@@ -512,6 +512,10 @@ flux create helmrelease nginx \
|
||||
|
||||
## Upgrade
|
||||
|
||||
!!! note "Patch versions"
|
||||
It is safe and advised to use the latest PATCH version when upgrading to a
|
||||
new MINOR version.
|
||||
|
||||
Update Flux CLI to the latest release with `brew upgrade fluxcd/tap/flux` or by
|
||||
downloading the binary from [GitHub](https://github.com/fluxcd/flux2/releases).
|
||||
|
||||
|
||||
6
go.mod
6
go.mod
@@ -7,15 +7,15 @@ require (
|
||||
github.com/cyphar/filepath-securejoin v0.2.2
|
||||
github.com/fluxcd/helm-controller/api v0.6.1
|
||||
github.com/fluxcd/image-automation-controller/api v0.4.0
|
||||
github.com/fluxcd/image-reflector-controller/api v0.4.1
|
||||
github.com/fluxcd/kustomize-controller/api v0.7.2
|
||||
github.com/fluxcd/image-reflector-controller/api v0.5.0
|
||||
github.com/fluxcd/kustomize-controller/api v0.7.3
|
||||
github.com/fluxcd/notification-controller/api v0.7.1
|
||||
github.com/fluxcd/pkg/apis/meta v0.7.0
|
||||
github.com/fluxcd/pkg/git v0.2.3
|
||||
github.com/fluxcd/pkg/runtime v0.8.0
|
||||
github.com/fluxcd/pkg/ssh v0.0.5
|
||||
github.com/fluxcd/pkg/untar v0.0.5
|
||||
github.com/fluxcd/source-controller/api v0.7.1
|
||||
github.com/fluxcd/source-controller/api v0.7.2
|
||||
github.com/google/go-containerregistry v0.2.0
|
||||
github.com/manifoldco/promptui v0.7.0
|
||||
github.com/olekukonko/tablewriter v0.0.4
|
||||
|
||||
12
go.sum
12
go.sum
@@ -195,10 +195,10 @@ github.com/fluxcd/helm-controller/api v0.6.1 h1:vraSNIXdSiqrjpKs53hnr2NMpL0YKGQc
|
||||
github.com/fluxcd/helm-controller/api v0.6.1/go.mod h1:vd4Nt6ZZlDkXwJLkmHRgvNc1bvBPMEIZ0o1qFyEWglo=
|
||||
github.com/fluxcd/image-automation-controller/api v0.4.0 h1:WMPVYfPQTLMvoINdoBDp5u26PJLO1EUZLyeQ95yHKgA=
|
||||
github.com/fluxcd/image-automation-controller/api v0.4.0/go.mod h1:lHGxbFJNIwgK32YWx9uNf4WR/Z92Hdrl8cn6TzixfUI=
|
||||
github.com/fluxcd/image-reflector-controller/api v0.4.1 h1:D1gJL6m7NYE8833eBoLT0qAJZ5Q2Yic3UtAEI10fiWg=
|
||||
github.com/fluxcd/image-reflector-controller/api v0.4.1/go.mod h1:MS3mGjZLnzZsfSqVLGbp0WNJr/k8XRFpw4G6ApLFTbc=
|
||||
github.com/fluxcd/kustomize-controller/api v0.7.2 h1:+Qv63+nQPcDLfUJfVj7DjkZZjNMflSOOTBvAhULvGm8=
|
||||
github.com/fluxcd/kustomize-controller/api v0.7.2/go.mod h1:GMdry0llCMT50hDcQ70ujmtd3vOXUWCJMTggPpGNM+I=
|
||||
github.com/fluxcd/image-reflector-controller/api v0.5.0 h1:xzE+Vi5NevR2TkD9OrEYmjBLTYxeQ28VY5mo0x1Q93Q=
|
||||
github.com/fluxcd/image-reflector-controller/api v0.5.0/go.mod h1:MS3mGjZLnzZsfSqVLGbp0WNJr/k8XRFpw4G6ApLFTbc=
|
||||
github.com/fluxcd/kustomize-controller/api v0.7.3 h1:TRjnb++wbIGJwVfJUGKQmMHXL///AvIZ1utYfZhX6K0=
|
||||
github.com/fluxcd/kustomize-controller/api v0.7.3/go.mod h1:GMdry0llCMT50hDcQ70ujmtd3vOXUWCJMTggPpGNM+I=
|
||||
github.com/fluxcd/notification-controller/api v0.7.1 h1:BDeJ172oJN0LKC6VJlu42NkeBCvTKn9cDPVaUo8M1Xs=
|
||||
github.com/fluxcd/notification-controller/api v0.7.1/go.mod h1:n1ow7Mxdcedrio5pf/HhBbaVp/4yGTFACPgfCtiyWoU=
|
||||
github.com/fluxcd/pkg/apis/meta v0.5.0 h1:FaU++mQY0g4sVVl+hG+vk0CXBLbb4EVfRuzs3IjLXvo=
|
||||
@@ -215,8 +215,8 @@ github.com/fluxcd/pkg/ssh v0.0.5 h1:rnbFZ7voy2JBlUfMbfyqArX2FYaLNpDhccGFC3qW83A=
|
||||
github.com/fluxcd/pkg/ssh v0.0.5/go.mod h1:7jXPdXZpc0ttMNz2kD9QuMi3RNn/e0DOFbj0Tij/+Hs=
|
||||
github.com/fluxcd/pkg/untar v0.0.5 h1:UGI3Ch1UIEIaqQvMicmImL1s9npQa64DJ/ozqHKB7gk=
|
||||
github.com/fluxcd/pkg/untar v0.0.5/go.mod h1:O6V9+rtl8c1mHBafgqFlJN6zkF1HS5SSYn7RpQJ/nfw=
|
||||
github.com/fluxcd/source-controller/api v0.7.1 h1:GsiPhpApnt83H1TOA5aw/55N/oiMItaf+j9dVpvJedA=
|
||||
github.com/fluxcd/source-controller/api v0.7.1/go.mod h1:u2sdc/QDm0tzXHL7mZVj928hc3MMU+4mKCuAQg+94Bk=
|
||||
github.com/fluxcd/source-controller/api v0.7.2 h1:u3izlrBqeYXFovf8pQ3EfVw0yB3gZwHpDLjAOnQWfKc=
|
||||
github.com/fluxcd/source-controller/api v0.7.2/go.mod h1:u2sdc/QDm0tzXHL7mZVj928hc3MMU+4mKCuAQg+94Bk=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk=
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- https://github.com/fluxcd/image-reflector-controller/archive/v0.4.1.zip//image-reflector-controller-0.4.1/config/crd
|
||||
- https://github.com/fluxcd/image-reflector-controller/archive/v0.4.1.zip//image-reflector-controller-0.4.1/config/manager
|
||||
- https://github.com/fluxcd/image-reflector-controller/archive/v0.5.0.zip//image-reflector-controller-0.5.0/config/crd
|
||||
- https://github.com/fluxcd/image-reflector-controller/archive/v0.5.0.zip//image-reflector-controller-0.5.0/config/manager
|
||||
- account.yaml
|
||||
patchesJson6902:
|
||||
- target:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- https://github.com/fluxcd/kustomize-controller/archive/v0.7.2.zip//kustomize-controller-0.7.2/config/crd
|
||||
- https://github.com/fluxcd/kustomize-controller/archive/v0.7.2.zip//kustomize-controller-0.7.2/config/manager
|
||||
- https://github.com/fluxcd/kustomize-controller/archive/v0.7.3.zip//kustomize-controller-0.7.3/config/crd
|
||||
- https://github.com/fluxcd/kustomize-controller/archive/v0.7.3.zip//kustomize-controller-0.7.3/config/manager
|
||||
- account.yaml
|
||||
patchesJson6902:
|
||||
- target:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- https://github.com/fluxcd/source-controller/archive/v0.7.1.zip//source-controller-0.7.1/config/crd
|
||||
- https://github.com/fluxcd/source-controller/archive/v0.7.1.zip//source-controller-0.7.1/config/manager
|
||||
- https://github.com/fluxcd/source-controller/archive/v0.7.2.zip//source-controller-0.7.2/config/crd
|
||||
- https://github.com/fluxcd/source-controller/archive/v0.7.2.zip//source-controller-0.7.2/config/manager
|
||||
- account.yaml
|
||||
patchesJson6902:
|
||||
- target:
|
||||
|
||||
Reference in New Issue
Block a user