From 0b792f2ac7ce0f0c98e98ac8ff2a55966a06a5c7 Mon Sep 17 00:00:00 2001 From: Max Jonas Werner Date: Thu, 30 Mar 2023 14:16:08 +0200 Subject: [PATCH] bump API version on all pages - GitRepository v1 - Kustomization v1 - Receiver v1 - CronJob v1 Signed-off-by: Max Jonas Werner --- content/en/flux/cheatsheets/oci-artifacts.md | 2 +- .../en/flux/cheatsheets/troubleshooting.md | 2 +- content/en/flux/faq.md | 14 ++++---- content/en/flux/flux-e2e.md | 2 +- content/en/flux/get-started.md | 4 +-- content/en/flux/gitops-toolkit/packages.md | 35 +++++++++++++------ .../en/flux/gitops-toolkit/source-watcher.md | 2 +- content/en/flux/guides/cron-job-image-auth.md | 6 ++-- content/en/flux/guides/helmreleases.md | 8 ++--- content/en/flux/guides/image-update.md | 6 ++-- content/en/flux/guides/mozilla-sops.md | 4 +-- content/en/flux/guides/notifications.md | 2 +- .../en/flux/guides/repository-structure.md | 8 ++--- content/en/flux/guides/webhook-receivers.md | 4 +-- content/en/flux/installation.md | 4 +-- content/en/flux/migration/faq-migration.md | 2 +- .../flux/migration/helm-operator-migration.md | 8 ++--- .../gh-actions-manifest-generation.md | 4 +-- content/en/flux/use-cases/running-jobs.md | 6 ++-- 19 files changed, 68 insertions(+), 55 deletions(-) diff --git a/content/en/flux/cheatsheets/oci-artifacts.md b/content/en/flux/cheatsheets/oci-artifacts.md index 443f82076..4462be4f1 100644 --- a/content/en/flux/cheatsheets/oci-artifacts.md +++ b/content/en/flux/cheatsheets/oci-artifacts.md @@ -73,7 +73,7 @@ spec: ref: tag: latest --- -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: podinfo diff --git a/content/en/flux/cheatsheets/troubleshooting.md b/content/en/flux/cheatsheets/troubleshooting.md index c3eac61ac..95eda45a8 100644 --- a/content/en/flux/cheatsheets/troubleshooting.md +++ b/content/en/flux/cheatsheets/troubleshooting.md @@ -157,7 +157,7 @@ in [`helm/helm#8281`](https://github.com/helm/helm/issues/8281). If you are running into this, confirm first that your chart has all the required excludes in their respective [`.helmignore`](https://helm.sh/docs/chart_template_guide/helm_ignore_file/) and -[`.sourceignore`](/flux/components/source/api/#source.toolkit.fluxcd.io/v1beta2.GitRepository) files. +[`.sourceignore`](/flux/components/source/api/#source.toolkit.fluxcd.io/v1.GitRepository) files. ### How to debug "not ready" errors? diff --git a/content/en/flux/faq.md b/content/en/flux/faq.md index 44473fb94..e4be0a241 100644 --- a/content/en/flux/faq.md +++ b/content/en/flux/faq.md @@ -47,7 +47,7 @@ Define a source of type `gitrepository.source.toolkit.fluxcd.io` that pulls changes from the app repository every 5 minutes inside the cluster: ```yaml -apiVersion: source.toolkit.fluxcd.io/v1beta2 +apiVersion: source.toolkit.fluxcd.io/v1 kind: GitRepository metadata: name: my-app @@ -63,7 +63,7 @@ Then define a `kustomization.kustomize.toolkit.fluxcd.io` that uses the `kustomi from `./deploy/prod` to determine which resources to create, update or delete: ```yaml -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: my-app @@ -122,7 +122,7 @@ Assuming an app repository with the following structure: Create a `GitRepository` definition and exclude all the files that are not Kubernetes manifests: ```yaml -apiVersion: source.toolkit.fluxcd.io/v1beta2 +apiVersion: source.toolkit.fluxcd.io/v1 kind: GitRepository metadata: name: my-app @@ -144,7 +144,7 @@ spec: Then create a `Kustomization` definition to reconcile the `./deploy/prod` dir: ```yaml -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: my-app @@ -257,7 +257,7 @@ spec: Then to reconcile the manifests on a cluster, you'll use the ones from the verified source: ```yaml -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: kyverno @@ -488,7 +488,7 @@ roll out a new version. We have couple options: #### Using Kustomize patches: ```yaml --- -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: apps @@ -537,7 +537,7 @@ spec: To enable the replacement of the `PODINFO_CHART_VERSION` variable with a different version than the `6.2.0` default, specify `postBuild` in the `Kustomization`: ```yaml -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: apps diff --git a/content/en/flux/flux-e2e.md b/content/en/flux/flux-e2e.md index 4bcbdb97a..b91725eab 100644 --- a/content/en/flux/flux-e2e.md +++ b/content/en/flux/flux-e2e.md @@ -450,7 +450,7 @@ In the analogy, the fruits are the charts and the GitRepository is the bag –  Flux provides tools that you have at your disposal for making sources narrowly scoped, here's one example: ```yaml -apiVersion: source.toolkit.fluxcd.io/v1beta2 +apiVersion: source.toolkit.fluxcd.io/v1 kind: GitRepository metadata: name: my-chart-git-repo diff --git a/content/en/flux/get-started.md b/content/en/flux/get-started.md index f375b9988..b0d173fd0 100644 --- a/content/en/flux/get-started.md +++ b/content/en/flux/get-started.md @@ -129,7 +129,7 @@ podinfo is a tiny web application made with Go. The output is similar to: ```yaml - apiVersion: source.toolkit.fluxcd.io/v1beta2 + apiVersion: source.toolkit.fluxcd.io/v1 kind: GitRepository metadata: name: podinfo @@ -168,7 +168,7 @@ directory located in the podinfo repository. The output is similar to: ```yaml - apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 + apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: podinfo diff --git a/content/en/flux/gitops-toolkit/packages.md b/content/en/flux/gitops-toolkit/packages.md index 34cf83947..bd35bfe3e 100644 --- a/content/en/flux/gitops-toolkit/packages.md +++ b/content/en/flux/gitops-toolkit/packages.md @@ -32,17 +32,24 @@ go get github.com/fluxcd/source-controller/api Import package ```go -import sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" +import sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" ``` +and/or (depending on the API types you will be consuming) + +```go +import sourcev1 "github.com/fluxcd/source-controller/api/v1" +``` + + API Types | Name | Version | |---|---| -| [GitRepository](../components/source/gitrepositories.md) | v1beta1 | -| [HelmRepository](../components/source/helmrepositories.md) | v1beta1 | -| [HelmChart](../components/source/helmcharts.md) | v1beta1 | -| [Bucket](../components/source/buckets.md) | v1beta1 | +| [GitRepository](../components/source/gitrepositories.md) | v1 | +| [HelmRepository](../components/source/helmrepositories.md) | v1beta2 | +| [HelmChart](../components/source/helmcharts.md) | v1beta2 | +| [Bucket](../components/source/buckets.md) | v1beta2 | ### kustomize.toolkit.fluxcd.io @@ -55,14 +62,14 @@ go get github.com/fluxcd/kustomize-controller/api Import package ```go -import kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta1" +import kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1" ``` API Types | Name | Version | |---|---| -| [Kustomization](../components/kustomize/kustomization.md) | v1beta1 | +| [Kustomization](../components/kustomize/kustomization.md) | v1 | ### helm.toolkit.fluxcd.io @@ -95,16 +102,22 @@ go get github.com/fluxcd/notification-controller/api Import package ```go -import helmv2 "github.com/fluxcd/notification-controller/api/v1beta1" +import notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" +``` + +and/or (depending on the API types you will be consuming) + +```go +import notificationv1 "github.com/fluxcd/notification-controller/api/v1" ``` API Types | Name | Version | |---|---| -| [Receiver](../components/notification/receiver.md) | v1beta1 | -| [Provider](../components/notification/provider.md) | v1beta1 | -| [Alert](../components/notification/alert.md) | v1beta1 | +| [Receiver](../components/notification/receiver.md) | v1 | +| [Provider](../components/notification/provider.md) | v1beta2 | +| [Alert](../components/notification/alert.md) | v1beta2 | ### image.toolkit.fluxcd.io diff --git a/content/en/flux/gitops-toolkit/source-watcher.md b/content/en/flux/gitops-toolkit/source-watcher.md index aaba0f184..2d4ae7208 100644 --- a/content/en/flux/gitops-toolkit/source-watcher.md +++ b/content/en/flux/gitops-toolkit/source-watcher.md @@ -204,7 +204,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" + sourcev1 "github.com/fluxcd/source-controller/api/v1" ) func init() { diff --git a/content/en/flux/guides/cron-job-image-auth.md b/content/en/flux/guides/cron-job-image-auth.md index 939ec07ea..971c1d288 100644 --- a/content/en/flux/guides/cron-job-image-auth.md +++ b/content/en/flux/guides/cron-job-image-auth.md @@ -63,7 +63,7 @@ metadata: # annotations: # eks.amazonaws.com/role-arn: --- -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: name: ecr-credentials-sync @@ -208,7 +208,7 @@ metadata: name: gcr-credentials-sync namespace: flux-system --- -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: name: gcr-credentials-sync @@ -309,7 +309,7 @@ our desired Namespace. Create a directory in your control repository and save this `kustomization.yaml`: ```yaml # kustomization.yaml -apiVersion: kustomize.config.k8s.io/v1beta1 +apiVersion: kustomize.config.k8s.io/v1 kind: Kustomization resources: - https://github.com/fluxcd/flux2/manifests/integrations/registry-credentials-sync/azure?ref=main diff --git a/content/en/flux/guides/helmreleases.md b/content/en/flux/guides/helmreleases.md index 054f0246f..cf3595e74 100644 --- a/content/en/flux/guides/helmreleases.md +++ b/content/en/flux/guides/helmreleases.md @@ -156,7 +156,7 @@ later on in the guide). An example `GitRepository`: ```yaml -apiVersion: source.toolkit.fluxcd.io/v1beta2 +apiVersion: source.toolkit.fluxcd.io/v1 kind: GitRepository metadata: name: podinfo @@ -349,7 +349,7 @@ spec: Create a `kustomization.yaml` that generates the `ConfigMap` using our kustomize config: ```yaml -apiVersion: kustomize.config.k8s.io/v1beta1 +apiVersion: kustomize.config.k8s.io/v1 kind: Kustomization namespace: podinfo resources: @@ -436,7 +436,7 @@ Kustomize configuration. Create a `kustomization.yaml` that generates the `Secret`: ```yaml -apiVersion: kustomize.config.k8s.io/v1beta1 +apiVersion: kustomize.config.k8s.io/v1 kind: Kustomization namespace: podinfo resources: @@ -594,7 +594,7 @@ kubectl -n flux-system create secret generic webhook-token \ When using [Harbor](https://goharbor.io/) as your Helm repository, you can define a receiver with: ```yaml -apiVersion: notification.toolkit.fluxcd.io/v1beta2 +apiVersion: notification.toolkit.fluxcd.io/v1 kind: Receiver metadata: name: helm-podinfo diff --git a/content/en/flux/guides/image-update.md b/content/en/flux/guides/image-update.md index 4b22cf71b..abc6f36a8 100644 --- a/content/en/flux/guides/image-update.md +++ b/content/en/flux/guides/image-update.md @@ -430,7 +430,7 @@ spec: Flux `Kustomization` example: ```yaml -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: podinfo @@ -445,7 +445,7 @@ spec: Kustomize config (`kustomization.yaml`) example: ```yaml -apiVersion: kustomize.config.k8s.io/v1beta1 +apiVersion: kustomize.config.k8s.io/v1 kind: Kustomization resources: - deployment.yaml @@ -537,7 +537,7 @@ kubectl -n flux-system create secret generic webhook-token \ Define a receiver for DockerHub: ```yaml -apiVersion: notification.toolkit.fluxcd.io/v1beta2 +apiVersion: notification.toolkit.fluxcd.io/v1 kind: Receiver metadata: name: podinfo diff --git a/content/en/flux/guides/mozilla-sops.md b/content/en/flux/guides/mozilla-sops.md index b6b08c11d..7898ae06a 100644 --- a/content/en/flux/guides/mozilla-sops.md +++ b/content/en/flux/guides/mozilla-sops.md @@ -509,7 +509,7 @@ add the GitRepository/Kustomization manifests to the fleet repository. Git repository manifest: ```yaml -apiVersion: source.toolkit.fluxcd.io/v1beta2 +apiVersion: source.toolkit.fluxcd.io/v1 kind: GitRepository metadata: name: my-secrets @@ -522,7 +522,7 @@ spec: Kustomization manifest: ```yaml -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: my-secrets diff --git a/content/en/flux/guides/notifications.md b/content/en/flux/guides/notifications.md index 01efbacb8..5b344e242 100644 --- a/content/en/flux/guides/notifications.md +++ b/content/en/flux/guides/notifications.md @@ -179,7 +179,7 @@ metadata: Then create a Kustomization to deploy podinfo. ```yaml -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: podinfo diff --git a/content/en/flux/guides/repository-structure.md b/content/en/flux/guides/repository-structure.md index 162b7c8b7..298dfa81c 100644 --- a/content/en/flux/guides/repository-structure.md +++ b/content/en/flux/guides/repository-structure.md @@ -155,7 +155,7 @@ App repository plain Kubernetes manifests example: Delivery example (stored in config repo): ```yaml -apiVersion: source.toolkit.fluxcd.io/v1beta2 +apiVersion: source.toolkit.fluxcd.io/v1 kind: GitRepository metadata: name: app @@ -164,7 +164,7 @@ spec: ref: semver: "1.x" --- -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: app @@ -195,7 +195,7 @@ App repository Kustomize overlays example: Delivery example (stored in config repo): ```yaml -apiVersion: source.toolkit.fluxcd.io/v1beta2 +apiVersion: source.toolkit.fluxcd.io/v1 kind: GitRepository metadata: name: app @@ -204,7 +204,7 @@ spec: ref: branch: main --- -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: app diff --git a/content/en/flux/guides/webhook-receivers.md b/content/en/flux/guides/webhook-receivers.md index 962c699a7..e531f62d4 100644 --- a/content/en/flux/guides/webhook-receivers.md +++ b/content/en/flux/guides/webhook-receivers.md @@ -87,7 +87,7 @@ Add any necessary annotations for your ingress controller or, for example, cert- Create a Git source pointing to a GitHub repository that you have control over: ```yaml -apiVersion: source.toolkit.fluxcd.io/v1beta2 +apiVersion: source.toolkit.fluxcd.io/v1 kind: GitRepository metadata: name: webapp @@ -119,7 +119,7 @@ kubectl -n flux-system create secret generic webhook-token \ Create a receiver for GitHub and specify the `GitRepository` object: ```yaml -apiVersion: notification.toolkit.fluxcd.io/v1beta2 +apiVersion: notification.toolkit.fluxcd.io/v1 kind: Receiver metadata: name: webapp diff --git a/content/en/flux/installation.md b/content/en/flux/installation.md index 1b1c3de27..bf804b6a2 100644 --- a/content/en/flux/installation.md +++ b/content/en/flux/installation.md @@ -502,7 +502,7 @@ touch clusters/my-cluster/flux-system/gotk-components.yaml \ Add patches to `kustomization.yaml`: ```yaml -apiVersion: kustomize.config.k8s.io/v1beta1 +apiVersion: kustomize.config.k8s.io/v1 kind: Kustomization resources: # manifests generated during bootstrap - gotk-components.yaml @@ -543,7 +543,7 @@ Assuming you want to lock down Flux on multi-tenant clusters, add the following patches to `clusters/my-cluster/flux-system/kustomization.yaml`: ```yaml -apiVersion: kustomize.config.k8s.io/v1beta1 +apiVersion: kustomize.config.k8s.io/v1 kind: Kustomization resources: - gotk-components.yaml diff --git a/content/en/flux/migration/faq-migration.md b/content/en/flux/migration/faq-migration.md index 6e8c4f491..438b6f095 100644 --- a/content/en/flux/migration/faq-migration.md +++ b/content/en/flux/migration/faq-migration.md @@ -87,7 +87,7 @@ Custom Prometheus metrics | Generic / common `controller-runtime` Prometheus met ### Are there any breaking changes? -- In Flux v1 Kustomize support was implemented through `.flux.yaml` files in the Git repository. As indicated in the comparison table above, while this approach worked, we found it to be error-prone and hard to debug. The new [Kustomization CR](https://github.com/fluxcd/kustomize-controller/blob/master/docs/spec/v1beta1/kustomization.md) should make troubleshooting much easier. Unfortunately we needed to drop the support for custom commands as running arbitrary shell scripts in-cluster poses serious security concerns. +- In Flux v1 Kustomize support was implemented through `.flux.yaml` files in the Git repository. As indicated in the comparison table above, while this approach worked, we found it to be error-prone and hard to debug. The new [Kustomization CR](https://github.com/fluxcd/kustomize-controller/blob/main/docs/spec/v1/kustomization.md) should make troubleshooting much easier. Unfortunately we needed to drop the support for custom commands as running arbitrary shell scripts in-cluster poses serious security concerns. - Helm users: we redesigned the `HelmRelease` API and the automation will work quite differently, so upgrading to `HelmRelease` v2 will require a little work from you, but you will gain more flexibility, better observability and performance. ### Is the GitOps Toolkit related to the GitOps Engine? diff --git a/content/en/flux/migration/helm-operator-migration.md b/content/en/flux/migration/helm-operator-migration.md index c433bef60..569d5b3e1 100644 --- a/content/en/flux/migration/helm-operator-migration.md +++ b/content/en/flux/migration/helm-operator-migration.md @@ -271,11 +271,11 @@ spec: path: ./charts/my-chart ``` -With the Helm Controller, you create a `GitRepository` resource in addition to the `HelmRelease` you would normally create (for all available fields, consult the [Source API reference](../components/source/api.md#source.toolkit.fluxcd.io/v1beta2.GitRepository): +With the Helm Controller, you create a `GitRepository` resource in addition to the `HelmRelease` you would normally create (for all available fields, consult the [Source API reference](../components/source/api.md#source.toolkit.fluxcd.io/v1.GitRepository): ```yaml --- -apiVersion: source.toolkit.fluxcd.io/v1beta2 +apiVersion: source.toolkit.fluxcd.io/v1 kind: GitRepository metadata: name: my-repository @@ -288,7 +288,7 @@ spec: # The Git reference to checkout and monitor for changes # (defaults to master) # For all available options, see: - # https://fluxcd.io/flux/components/source/api/#source.toolkit.fluxcd.io/v1beta2.GitRepositoryRef + # https://fluxcd.io/flux/components/source/api/#source.toolkit.fluxcd.io/v1.GitRepositoryRef ref: branch: master ``` @@ -311,7 +311,7 @@ data: identity.pub: known_hosts: --- -apiVersion: source.toolkit.fluxcd.io/v1beta2 +apiVersion: source.toolkit.fluxcd.io/v1 kind: GitRepository metadata: name: my-repository diff --git a/content/en/flux/use-cases/gh-actions-manifest-generation.md b/content/en/flux/use-cases/gh-actions-manifest-generation.md index af563743d..11ac8d4eb 100644 --- a/content/en/flux/use-cases/gh-actions-manifest-generation.md +++ b/content/en/flux/use-cases/gh-actions-manifest-generation.md @@ -211,7 +211,7 @@ A configmap is an ideal place to write a variable that is needed by any downstre ```yaml --- -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: any-old-app-devl @@ -228,7 +228,7 @@ spec: - kind: ConfigMap name: any-old-app-version --- -apiVersion: source.toolkit.fluxcd.io/v1beta2 +apiVersion: source.toolkit.fluxcd.io/v1 kind: GitRepository metadata: name: any-old-app-prod diff --git a/content/en/flux/use-cases/running-jobs.md b/content/en/flux/use-cases/running-jobs.md index 7a9ccef1d..6c91b1bd0 100644 --- a/content/en/flux/use-cases/running-jobs.md +++ b/content/en/flux/use-cases/running-jobs.md @@ -64,7 +64,7 @@ spec: And a Flux Kustomization that reconciles it at `./flux/pre-deploy.yaml`: ```yaml -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: app-pre-deploy @@ -91,7 +91,7 @@ we define a Flux Kustomization that depends on the migration one. Example of `./flux/deploy.yaml`: ```yaml -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: app-deploy @@ -117,7 +117,7 @@ application was upgraded. Example of `./flux/post-deploy.yaml`: ```yaml -apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: app-post-deploy