From f2502bc26ede500bf3affab9c3fe4473b7d2781b Mon Sep 17 00:00:00 2001 From: Philip Laine Date: Thu, 6 Apr 2023 20:57:15 +0200 Subject: [PATCH] Deprecate datasources --- docs/guides/customize-flux.md | 1 + docs/guides/github.md | 1 + docs/guides/gitlab.md | 1 + docs/guides/gke_github.md | 1 + docs/guides/multi-env.md | 1 + internal/provider/data_install.go | 1 + internal/provider/data_sync.go | 1 + templates/guides/customize-flux.md.tmpl | 1 + templates/guides/github.md.tmpl | 1 + templates/guides/gitlab.md.tmpl | 1 + templates/guides/gke_github.md.tmpl | 1 + templates/guides/multi-env.md.tmpl | 1 + 12 files changed, 12 insertions(+) diff --git a/docs/guides/customize-flux.md b/docs/guides/customize-flux.md index 7bf7eb48..09d4dfb2 100644 --- a/docs/guides/customize-flux.md +++ b/docs/guides/customize-flux.md @@ -1,6 +1,7 @@ --- subcategory: "" page_title: "Customize Flux" +subcategory: "Deprecated" description: |- Customizing Flux past the exposed parameters. --- diff --git a/docs/guides/github.md b/docs/guides/github.md index 71c9a115..4346b6dc 100644 --- a/docs/guides/github.md +++ b/docs/guides/github.md @@ -1,6 +1,7 @@ --- subcategory: "" page_title: "Bootstrap a cluster with GitHub" +subcategory: "Deprecated" description: |- An example of how to bootstrap a Kubernetes cluster and sync it with a GitHub repository. --- diff --git a/docs/guides/gitlab.md b/docs/guides/gitlab.md index 0fcee759..f4d2ce50 100644 --- a/docs/guides/gitlab.md +++ b/docs/guides/gitlab.md @@ -1,6 +1,7 @@ --- subcategory: "" page_title: "Bootstrap a cluster with GitLab" +subcategory: "Deprecated" description: |- An example of how to bootstrap a Kubernetes cluster and sync it with a GitLab repository. --- diff --git a/docs/guides/gke_github.md b/docs/guides/gke_github.md index b543d607..c85166bf 100644 --- a/docs/guides/gke_github.md +++ b/docs/guides/gke_github.md @@ -1,6 +1,7 @@ --- subcategory: "" page_title: "Bootstrap a GKE cluster with GitHub" +subcategory: "Deprecated" description: |- An example of how to bootstrap Flux on GKE and sync it with a GitHub repository. --- diff --git a/docs/guides/multi-env.md b/docs/guides/multi-env.md index 9d4db04a..a917c06c 100644 --- a/docs/guides/multi-env.md +++ b/docs/guides/multi-env.md @@ -1,6 +1,7 @@ --- subcategory: "" page_title: "Multi Environment Considerations" +subcategory: "Deprecated" description: |- Considerations when deploying multiple environments. --- diff --git a/internal/provider/data_install.go b/internal/provider/data_install.go index 19a1172b..58995949 100644 --- a/internal/provider/data_install.go +++ b/internal/provider/data_install.go @@ -66,6 +66,7 @@ func (s *installDataSource) Metadata(ctx context.Context, req datasource.Metadat func (s *installDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { opts := install.MakeDefaultOptions() resp.Schema = schema.Schema{ + DeprecationMessage: "This datasource is deprecated and will be removed in the future. Use flux_bootstrap_git resource instead. https://registry.terraform.io/providers/fluxcd/flux/latest/docs/guides/migrating-to-resource", MarkdownDescription: "`flux_install` can be used to generate Kubernetes manifests for deploying Flux.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ diff --git a/internal/provider/data_sync.go b/internal/provider/data_sync.go index eae392b6..b3b6d503 100644 --- a/internal/provider/data_sync.go +++ b/internal/provider/data_sync.go @@ -70,6 +70,7 @@ func (s *syncDataSource) Metadata(ctx context.Context, req datasource.MetadataRe func (s *syncDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { opts := sync.MakeDefaultOptions() resp.Schema = schema.Schema{ + DeprecationMessage: "This datasource is deprecated and will be removed in the future. Use flux_bootstrap_git resource instead. https://registry.terraform.io/providers/fluxcd/flux/latest/docs/guides/migrating-to-resource", MarkdownDescription: "`flux_sync` can be used to generate manifests for reconciling the specified repository path on the cluster.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ diff --git a/templates/guides/customize-flux.md.tmpl b/templates/guides/customize-flux.md.tmpl index 49af27fe..7f492b03 100644 --- a/templates/guides/customize-flux.md.tmpl +++ b/templates/guides/customize-flux.md.tmpl @@ -1,6 +1,7 @@ --- subcategory: "" page_title: "Customize Flux" +subcategory: "Deprecated" description: |- Customizing Flux past the exposed parameters. --- diff --git a/templates/guides/github.md.tmpl b/templates/guides/github.md.tmpl index c52c6f9b..d8373e76 100644 --- a/templates/guides/github.md.tmpl +++ b/templates/guides/github.md.tmpl @@ -1,6 +1,7 @@ --- subcategory: "" page_title: "Bootstrap a cluster with GitHub" +subcategory: "Deprecated" description: |- An example of how to bootstrap a Kubernetes cluster and sync it with a GitHub repository. --- diff --git a/templates/guides/gitlab.md.tmpl b/templates/guides/gitlab.md.tmpl index ecaf53d4..01a146a3 100644 --- a/templates/guides/gitlab.md.tmpl +++ b/templates/guides/gitlab.md.tmpl @@ -1,6 +1,7 @@ --- subcategory: "" page_title: "Bootstrap a cluster with GitLab" +subcategory: "Deprecated" description: |- An example of how to bootstrap a Kubernetes cluster and sync it with a GitLab repository. --- diff --git a/templates/guides/gke_github.md.tmpl b/templates/guides/gke_github.md.tmpl index cf140ad0..3c72e5ae 100644 --- a/templates/guides/gke_github.md.tmpl +++ b/templates/guides/gke_github.md.tmpl @@ -1,6 +1,7 @@ --- subcategory: "" page_title: "Bootstrap a GKE cluster with GitHub" +subcategory: "Deprecated" description: |- An example of how to bootstrap Flux on GKE and sync it with a GitHub repository. --- diff --git a/templates/guides/multi-env.md.tmpl b/templates/guides/multi-env.md.tmpl index cf23035e..6d8e9cef 100644 --- a/templates/guides/multi-env.md.tmpl +++ b/templates/guides/multi-env.md.tmpl @@ -1,6 +1,7 @@ --- subcategory: "" page_title: "Multi Environment Considerations" +subcategory: "Deprecated" description: |- Considerations when deploying multiple environments. ---