Commit Graph

196 Commits

Author SHA1 Message Date
Surya ad74b81222
Update kustomization.md
Signed-off-by: Surya <surya.pandian@truelayer.com>
2022-08-20 21:56:53 +01:00
Surya 2a84f3d874
Update kustomization.md
Signed-off-by: Surya <surya.pandian@truelayer.com>
2022-08-20 17:02:04 +01:00
Surya e63edd6408
Update kustomization.md
Signed-off-by: Surya <surya.pandian@truelayer.com>
2022-08-20 17:00:26 +01:00
Stefan Prodan a7d790f1b2
Add support for OCIRepository sources
- allow `OCIRepository` to be specified in `sourceRef.kind`
- react to `OCIRepository` artifacts events
- add end-to-end test for OCI repositories

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-08 18:26:03 +03:00
Andrés Botero 323c2d3253
Fix typo from pune to prune
Signed-off-by: Andrés Botero <yosoy@andresbotero.co>
2022-07-19 10:18:26 -05:00
Stefan Prodan a41274ff97
docs: Add example section and dockerconfigjson encryption
- remove the Go spec section
- add basic usage example
- fix SOPS CLI examples
- explain how to generate image pull secrets from encrypted dockerconfigjson files

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-06-07 15:32:16 +03:00
Somtochi Onyekwere 2ac475ebef sops/gcpkms: add key source implementation
This adds a SOPS GCP KMS key source which makes use of the latest GCP
client, and supports both injection of master key credentials and a
default client making use of environmental runtime values.

The implementation fully replaces SOPS', and is covered with
compatability tests.

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-05-24 21:51:46 +02:00
Sanskar Jaiswal d7307bbd51 add secret mount note in docs
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-20 14:43:21 +05:30
Sanskar Jaiswal 326e20c41b update code comments and kms decryption docs
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-19 14:34:16 +05:30
Sanskar Jaiswal c801f75458 add docs
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-19 14:33:31 +05:30
Hidde Beydals 2b2246c876 spec: take note of KubeConfig.SecretRef.Key field
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-03 15:59:04 +02:00
Stefan Prodan ba03c878b0
Merge pull request #638 from fluxcd/no-remote-bases
Disallow remote bases usage in Kustomize overlays
2022-05-03 11:35:05 +03:00
Nick Stogner 6aeff8c924 Support defining a KubeConfig Secret data key
Signed-off-by: Nick Stogner <nicholas.stogner@gmail.com>
2022-04-29 10:04:14 -04:00
Stefan Prodan cafbe253a1
Disallow remote bases usage in Kustomize overlays
Add an optional flag for disabling remote bases. While the `--no-remote-bases` is set to `false` by default, Flux users are encouraged to enable it on production system for security and performance reasons. Using Kustomize remote bases means that kustomize-controller must clone the remote repositories on every reconciliation instead of using the source-controller artifacts cache. Allowing remote bases on multi-tenant clusters, means platform admins have no control over which repositories make up the desired state.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-04-27 14:54:43 +03:00
Paulo Gomes d0069707e0
Update KubeConfig documentation
When the flag --default-service-account was added it changed
slightly the behaviour of the spec.KubeConfig field. It forces
the impersonation to always take place, either via the contents
of spec.ServiceAccountName or its fallback at controller level.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-04-04 16:20:19 +01:00
Sunny 1e616ed9e0
docs/spec/v1beta2: fix recommended settings typo
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-04-01 08:22:11 +05:30
Stefan Prodan 8770770c1f
Add recommended settings to API docs
Add example of deploying applications from Git to production environments.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-29 11:30:10 +03:00
Hidde Beydals 855d57c491 Use new standardized meta and runtime pkgs
This includes an update of the source-controller to v0.22.0, to pull in
the v1beta2 API which makes use of the same packages.

Co-authored-by: Sunny <darkowlzz@protonmail.com>
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-18 12:04:39 +01:00
Hidde Beydals 9f768615a9 Document SOPS Azure Key Vault in spec
This includes a refactor of the other entries, to start moving guides
to the website while containing minimal technical (instructions)
in-spec.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-14 10:29:02 +01:00
Stefan Prodan 608531e499
Merge pull request #582 from kingdonb/fixup-kubeval
fixup reference to kubeval
2022-03-07 14:44:04 +02:00
Kingdon Barrett 89841cbe28
fixup reference to kubeval
Update docs/spec/v1beta2/kustomization.md

Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Kingdon Barrett <kingdon@weave.works>
2022-03-07 07:27:26 -05:00
Stefan Prodan d56695a93b
Allow shared ownership of in-cluster objects applied with kubectl
Introduce an annotation that configures kustomize-controller to co-manage objects applied with kubectl.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-04 12:37:30 +02:00
Stefan Prodan 91f6d8e0a8
Release v0.21.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-23 10:32:25 +02:00
Steven E. Harris af038d6df5
Copyedit Kustomization documentation
Signed-off-by: Steven E. Harris <seh@panix.com>
2022-02-15 09:27:45 -05:00
Steven E. Harris eba4168672
Tolerate absence of resources in post-build subst.
In a Kustomization's post-build substitution sources, introduce a new
"Optional" field to allow referencing a Kubernetes ConfigMap or Secret
that may not exist at time of reconciliation. Treat substitution when
the referenced object is missing as if the object had been present but
empty, lacking any variable bindings.

Retain the longstanding behavior of interpreting references to
Kubernetes objects being mandatory by default, such that
reconciliation fails if such a referenced object does not exist. Only
when the "Optional" field is set to true will reconciliation tolerate
finding the referenced object to be missing.

Signed-off-by: Steven E. Harris <seh@panix.com>
2022-02-15 09:27:41 -05:00
Kingdon Barrett 3d95b875e1
Clarify that spec.path is in the Kustomization
+ in the `spec.path` of the Flux `Kustomization`

In #2357 it was noted that we mention `spec.path` but the code example
provided for context is a `GitRepository`. This is a leap too far, let's
provide this to better clarify the context.

Signed-off-by: Kingdon Barrett <kingdon@weave.works>
2022-02-09 16:17:19 -05:00
Daniel Holbach d768b6cf76 fix typo
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-02-08 10:25:01 +01:00
Stefan Prodan 4d7cba91b0
Allow setting a default service account for impersonation
Introduce the flag `--default-service-account` for allowing cluster admins to enforce impersonation for resources reconciliation.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-27 18:25:02 +02:00
Stefan Prodan 518c8a021b
Allow disabling cross-namespace references
Introduce the flag `--no-cross-namespace-refs` (defaults to false) for allowing cluster admins to disable cross-namespace references to sources.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-26 22:50:10 +02:00
Soule BA c579e71430
add native support for sops decryption/encryption with Vault
If implemented, the kustomize controller will be able to retrieve a
secret containing a VAULT TOKEN and use it to decrypt the sops encrypted
master key. It will then use it to decrypt the data key and finally use the data
key to decrypt the final data.

Signed-off-by: Soule BA <bah.soule@gmail.com>
2022-01-19 21:59:10 +01:00
Gonzalo Villafañe Tapia 6c343e15ae Docs - Add var substitution operator escape syntax
Signed-off-by: Gonzalo Villafañe Tapia <gvillafanetapia@gmail.com>
2022-01-14 17:46:10 -03:00
George Gaál 2b32f0f7a3 Update kustomization.md
fix typo

Signed-off-by: Gaál George <gb12335@gmail.com>
2021-12-30 15:21:21 +01:00
Somtochi Onyekwere 6fa1c8a9dd Add docs for when KC doesn't revert
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-12-02 10:41:20 +01:00
Somtochi Onyekwere 0d9bd5a554 Add line above yaml block
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-11-29 12:02:45 +01:00
Somtochi Onyekwere f6403df16f Add test for varsub in secret
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-11-25 12:34:20 +01:00
Stefan Prodan 0ce7c1267e
Allow disabling the reconciliation of in-cluster resources
Introduce `kustomize.toolkit.fluxcd.io/reconcile` annotation. When set to `disabled`, the controller will no longer apply changes from source, nor it will prune the annotated resource.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-09 10:50:52 +02:00
Stefan Prodan c610944139
SOPS: Fix dotenv decryption error reporting
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-19 11:10:10 +03:00
Stefan Prodan 95dca0feb6
SOPS: Document env secret generator
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-19 10:03:46 +03:00
Stefan Prodan 51a7189087
Restore `spec.validation` and mark it as deprecated
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-07 14:17:02 +03:00
Stefan Prodan dba56a569e
Add example for `.spec.wait` usage
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-07 11:37:39 +03:00
Stefan Prodan 64084ea03b
Add test for reconciling an empty source
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:40 +03:00
Stefan Prodan 9c533e4a52
Run SSA resource manager tests in CI
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:40 +03:00
Stefan Prodan 9c8f284b7f
Add `spec.wait` usage to the API docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:40 +03:00
Stefan Prodan 468f00e416
Implement health checking for all resources
- Add `.spec.wait` optional boolean field to API
- Wait for all applied resources to become ready when `.spec.wait` is set to `true`

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:39 +03:00
Stefan Prodan 7ffe62b8e7
Introduce v1beta2 API
Changes from v1beta1:
- `spec.validation` removed (server-side validation is implicit)
- `spec.status.snapshot` replaced by `spec.status.inventory`
- `spec.patchesStrategicMerge` deprecated in favour of `spec.patches`
- `spec.patchesJson6902` deprecated in favour of `spec.patches`

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:33:26 +03:00
Stefan Prodan a49bbf9ed3
Skip garbage collection of objects with owner references
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-18 12:49:28 +03:00
Stefan Prodan 5d1cb91841
Make the kubeconfig secrets compatible with SOPS
Add `values.yaml` to the supported kubeconfig secret key names in order for SOPS to correctly detect the storage format based on the file extension.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-04 14:43:33 +03:00
Oliver Bähler 6cc6e1d391 More explicit example
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
2021-07-07 15:06:41 +02:00
Oliver Bähler 69f9ebd1e7 Var substitution opt-in
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
2021-07-07 14:24:39 +02:00
Stefan Prodan 2370360c10
Add the generic patch field to the API spec docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-18 10:42:34 +03:00
Stefan Prodan 6672928023
Merge pull request #364 from Kissy/generic-patches
Add support for in-line generic patches to Flux Kustomization API
2021-06-14 14:28:15 +03:00
Stefan Prodan 7772a1f679
Document the checksum annotation
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-14 13:49:10 +03:00
Guillaume Le Biller 14bce3c666
Update pkg/apis/kustomize to v0.2.0
Signed-off-by: Guillaume Le Biller <glebiller@Traveldoo.com>
2021-06-11 16:45:50 +02:00
Guillaume Le Biller b797eac907
Implement generic patches in Kustomization
Allow patching multiple resources instead of a single existing one as
StrategicMerge & JSON6902 are forced to target existing named resources.

Signed-off-by: Guillaume Le Biller <glebiller@Traveldoo.com>
2021-06-11 09:04:37 +02:00
Stefan Prodan 4efb8b2314
Release v0.12.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-29 11:04:55 +03:00
bob.rohan a77ea03ec6 Decrypt base64 encoded SOPS encrypted secrets
Signed-off-by: Bob Rohan <bob.rohan@hodge.co.uk>
2021-04-28 11:54:25 +01:00
Hidde Beydals 8d304ad130 Document age decryption in spec
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-01 15:17:33 +02:00
Stefan Prodan cb72a77753
Validate the var names before substitution
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-27 12:09:57 +02:00
Stefan Prodan 65cfce2978
Add spec.force to API docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-22 17:36:37 +02:00
Aurel Canciu 729dc9770e
Support recreating objects on immutable field updates
Allow passing --force to kubectl apply. Useful when dealing with
immutable field changes in resources.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2021-02-22 16:59:01 +02:00
Stefan Prodan 401fec6c8d
Allow disabling var substitution for certain resources
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-16 10:40:01 +02:00
Stefan Prodan 0ac1f9e631
Implement var substitution from ConfigMaps and Secrets
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-16 09:20:00 +02:00
Stefan Prodan acaaafc3e6
Add note about prefixing variables
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-11 18:35:46 +02:00
Stefan Prodan f694414d6d
Add Drone envsubst install to docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-11 18:17:58 +02:00
Stefan Prodan f3d9c36691
Add support for variable substitutions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-11 18:17:53 +02:00
Stefan Prodan b2cfe6d3f8
Allow disabling of prune on certain resources
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-07 14:16:25 +02:00
Hidde Beydals d7cdeb6d39 Add link to APIExtensions in generated docs
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-04 09:33:34 +01:00
Hidde Beydals 65ceea860e Document Strategic Merge and JSON 6902 overrides
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-04 09:33:31 +01:00
Hidde Beydals 17a6bff52e Add Patches{StrategicMerge,JSON6902} fields to API
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-03 20:31:11 +01:00
Hidde Beydals 02de763ad8 Depend on the Kustomize API from `fluxcd/pkg`
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-03 20:12:58 +01:00
Stefan Prodan 0e0277aaef
Update RetryInterval description
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-22 16:22:37 +02:00
Stefan Prodan 4df56cb7ab
Add RetryInterval as optional field to API
The spec.retryInterval is the interval at which to retry a previously failed reconciliation.
When not specified, it defaults to the spec.interval value.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-22 15:48:28 +02:00
Stefan Prodan 62a764a28e
Use the object reference type from fluxcd/pkg/meta
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-21 13:24:32 +02:00
Stefan Prodan 848c3f3b59
Release v0.6.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-19 15:44:04 +02:00
Hidde Beydals 69a7e75a91 Make Path an optional field and remove validation
As due to secure joins, the requirement on both providing a path
and/or requiring it to be in a certain format offers little value
over the UX experience of not having to provide it when you just
want to reconcile whatever can be found in the root of the source
reference.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-12-16 12:44:13 +01:00
Stefan Prodan b09af484ec
Release v0.5.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-11 13:54:43 +02:00
Somtochi Onyekwere 5b3d8df5b5 Add image type to API spec
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2020-12-10 13:23:55 +01:00
Somtochi Onyekwere 3ebf16cbbb Updates doc with API spec for images
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2020-12-10 13:23:55 +01:00
Stefan Prodan 962f02ad65
Use cert-manager example for dependsOn docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-29 16:09:29 +02:00
Stefan Prodan 8f7f0d8c8f
Document that KubeConfig takes precedence over ServiceAccountName
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-20 11:34:35 +02:00
Stefan Prodan 0c9170241f
Use ServiceAccountName for impersonation
Drop the ServiceAccount field in favour of ServiceAccountName to prevent privilege escalation in multi-tenancy environments.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-20 10:58:24 +02:00
Aurel Canciu ac6cc88e29
Refactor to adopt k8s standardized Condition type
Updates to use metav1.Condition type and removes references for
deprecated corev1.Condition* constants and uses the new k8s api/meta
helpers in place of the old pkg/apis/meta types.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-11-19 19:49:04 +02:00
Paweł Kowalczyk 36909aa2e4 Add docs for excluding non-k8 YAML files in kustomization generation
Signed-off-by: Paweł Kowalczyk <kowalczyk.paw@gmail.com>
2020-11-18 10:27:59 +01:00
Stefan Prodan 2ba6252d76
Allow disabling validation
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-12 12:18:04 +02:00
Tomas Virgl eba1c5e389 docs: minor typo fix
Signed-off-by: Tomas Virgl <tomas@virgl.net>
2020-11-08 00:55:00 +01:00
Stefan Prodan 97cef5a84e
Add labels and selector example to docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-03 15:44:54 +02:00
Stefan Prodan 72a3aa4d2f
Release v0.2.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-29 14:03:06 +02:00
Michael Bridgen 3ca1bf2f16 Cross-reference anything from apis/meta to godoc
This means ReconcileRequestStatus is also given a link to the godoc,
as a consolation for not having its field inlined.
2020-10-22 12:02:19 +01:00
Michael Bridgen b8d71327f7 Use reconcile request annotation helpers
Per https://github.com/fluxcd/pkg/issues/39
2020-10-22 11:37:13 +01:00
Hidde Beydals 154560f60e Improve remote cluster documentation
To highlight the fact that it works with just a KubeConfig, and not just
CAPI.
2020-10-20 14:03:53 +02:00
Stefan Prodan 028c368975
Add targeting non-capi clusters to docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-16 12:40:17 +03:00
leigh capili ceb439d13c Document Kustomization.spec.kubeConfig for Cluster API 2020-10-15 09:44:44 -06:00
Stefan Prodan 4b6ca1dbf4
Add namespace to API docs examples
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-13 17:26:10 +03:00
stefanprodan d15726935a Set default branch to main 2020-10-05 15:41:20 +03:00
Philip Laine 9e03c57fab Update health check docs 2020-10-04 12:19:00 +02:00
stefanprodan 1184614239 Set default namespace to gotk-system 2020-10-02 16:24:00 +03:00
stefanprodan 50104826ae Promote API to v1beta1 2020-09-30 19:10:27 +03:00
stefanprodan 7b8fef2984 Implement `fluxcd/pkg/meta/api` in APIs 2020-09-30 14:01:17 +03:00
stefanprodan 2da8d7ca0c Add KubeConfig field to API 2020-09-30 01:00:44 +03:00
stefanprodan 45bfe6dfe5 Record last handled reconcile at annotation 2020-09-29 21:14:19 +03:00