diff --git a/CHANGELOG.md b/CHANGELOG.md index 892ee357..84a576ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,7 +70,7 @@ and can prune resources safely without hitting Kubernetes API rate limits. ## 0.0.1-alpha.6 (2020-05-03) This alpha release comes with -[role-based access control](https://github.com/fluxcd/kustomize-controller/blob/master/docs/spec/v1alpha1/kustomization.md#role-based-access-control) +[role-based access control](https://github.com/fluxcd/kustomize-controller/blob/v0.0.1-alpha.6/docs/spec/v1alpha1/kustomization.md#role-based-access-control) for restricting the execution of a kustomization apply to a specific service account. ## 0.0.1-alpha.5 (2020-04-27) @@ -82,19 +82,19 @@ This allows waiting for an on-demand sync to complete. ## 0.0.1-alpha.4 (2020-04-24) This alpha release introduces a new status field for recording the -[last applied source revision](https://github.com/fluxcd/kustomize-controller/blob/master/docs/spec/v1alpha1/kustomization.md#status). +[last applied source revision](https://github.com/fluxcd/kustomize-controller/blob/v0.0.1-alpha.4/docs/spec/v1alpha1/kustomization.md#status). Feature comparison with Flux has been added to -[docs/spec](https://github.com/fluxcd/kustomize-controller/blob/master/docs/spec/README.md#backward-compatibility). +[docs/spec](https://github.com/fluxcd/kustomize-controller/blob/v0.0.1-alpha.4/docs/spec/README.md#backward-compatibility). ## 0.0.1-alpha.3 (2020-04-23) This alpha release introduces the option to tell the controller to -[automatically generate](https://github.com/fluxcd/kustomize-controller/blob/master/docs/spec/v1alpha1/kustomization.md#generate-kustomizationyaml) +[automatically generate](https://github.com/fluxcd/kustomize-controller/blob/v0.0.1-alpha.3/docs/spec/v1alpha1/kustomization.md#generate-kustomizationyaml) the `kustomization.yaml` for repositories that contain plain Kubernetes manifests. The controller design and motivation can be found at -[docs/spec](https://github.com/fluxcd/kustomize-controller/tree/master/docs/spec). +[docs/spec](https://github.com/fluxcd/kustomize-controller/tree/v0.0.1-alpha.3/docs/spec). ## 0.0.1-alpha.2 (2020-04-21) @@ -104,10 +104,10 @@ that allows grouping [Kustomization](https://github.com/fluxcd/kustomize-controller/blob/master/docs/spec/v1alpha1/kustomization.md) objects and defining a common behavior for them. The v1alpha1 profiles can be used for -[configuring Slack and Discord alerting](https://github.com/fluxcd/kustomize-controller/tree/master#configure-alerting). +[configuring Slack and Discord alerting](https://github.com/fluxcd/kustomize-controller/tree/v0.0.1-alpha.2#configure-alerting). ## 0.0.1-alpha.1 (2020-04-20) This is the first alpha release of kustomize controller. The controller is an implementation of the -[kustomize.fluxcd.io/v1alpha1](https://github.com/fluxcd/kustomize-controller/tree/master/docs/spec/v1alpha1) API. +[kustomize.fluxcd.io/v1alpha1](https://github.com/fluxcd/kustomize-controller/tree/v0.0.1-alpha.1/docs/spec/v1alpha1) API. diff --git a/Makefile b/Makefile index 88fa8837..e6949925 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ IMG ?= fluxcd/kustomize-controller:latest # Produce CRDs that work back to Kubernetes 1.16 CRD_OPTIONS ?= crd:crdVersions=v1 -SOURCE_VER ?= v0.0.6 +SOURCE_VER ?= v0.0.7 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -26,7 +26,7 @@ run: generate fmt vet manifests go run ./main.go download-crd-deps: - curl -s https://raw.githubusercontent.com/fluxcd/source-controller/${SOURCE_VER}/config/crd/bases/source.fluxcd.io_gitrepositories.yaml > config/crd/bases/gitrepositories.yaml + curl -s https://raw.githubusercontent.com/fluxcd/source-controller/${SOURCE_VER}/config/crd/bases/source.toolkit.fluxcd.io_gitrepositories.yaml > config/crd/bases/gitrepositories.yaml # Install CRDs into a cluster install: manifests diff --git a/PROJECT b/PROJECT index 2494f44c..3d1950ed 100644 --- a/PROJECT +++ b/PROJECT @@ -1,4 +1,4 @@ -domain: fluxcd.io +domain: toolkit.fluxcd.io repo: github.com/fluxcd/kustomize-controller resources: - group: kustomize diff --git a/README.md b/README.md index b8558849..a955d00a 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ tk install Create a source object that points to a Git repository containing Kubernetes and Kustomize manifests: ```yaml -apiVersion: source.fluxcd.io/v1alpha1 +apiVersion: source.toolkit.fluxcd.io/v1alpha1 kind: GitRepository metadata: name: podinfo @@ -86,7 +86,7 @@ kubectl -n gitops-system annotate --overwrite gitrepository/podinfo fluxcd.io/re Create a kustomization object that uses the git repository defined above: ```yaml -apiVersion: kustomize.fluxcd.io/v1alpha1 +apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1 kind: Kustomization metadata: name: podinfo-dev @@ -193,7 +193,7 @@ When combined with health assessment, a kustomization will run after all its dep For example, a service mesh proxy injector should be running before deploying applications inside the mesh: ```yaml -apiVersion: kustomize.fluxcd.io/v1alpha1 +apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1 kind: Kustomization metadata: name: istio @@ -210,7 +210,7 @@ spec: namespace: istio-system timeout: 2m --- -apiVersion: kustomize.fluxcd.io/v1alpha1 +apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1 kind: Kustomization metadata: name: podinfo-dev @@ -231,7 +231,7 @@ spec: For production deployments, instead of synchronizing with a branch you can use a semver range to target stable releases: ```yaml -apiVersion: source.fluxcd.io/v1alpha1 +apiVersion: source.toolkit.fluxcd.io/v1alpha1 kind: GitRepository metadata: name: podinfo-releases @@ -249,7 +249,7 @@ that matches the semver range. Create a production kustomization and reference the git source that follows the latest semver release: ```yaml -apiVersion: kustomize.fluxcd.io/v1alpha1 +apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1 kind: Kustomization metadata: name: podinfo-production diff --git a/api/v1alpha1/doc.go b/api/v1alpha1/doc.go index b156e0ad..dd7e7648 100644 --- a/api/v1alpha1/doc.go +++ b/api/v1alpha1/doc.go @@ -16,5 +16,5 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the kustomize v1alpha1 API group // +kubebuilder:object:generate=true -// +groupName=kustomize.fluxcd.io +// +groupName=kustomize.toolkit.fluxcd.io package v1alpha1 diff --git a/api/v1alpha1/groupversion_info.go b/api/v1alpha1/groupversion_info.go index 4653466a..95a7da99 100644 --- a/api/v1alpha1/groupversion_info.go +++ b/api/v1alpha1/groupversion_info.go @@ -23,7 +23,7 @@ import ( var ( // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "kustomize.fluxcd.io", Version: "v1alpha1"} + GroupVersion = schema.GroupVersion{Group: "kustomize.toolkit.fluxcd.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/config/crd/bases/kustomize.fluxcd.io_kustomizations.yaml b/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml similarity index 99% rename from config/crd/bases/kustomize.fluxcd.io_kustomizations.yaml rename to config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml index 880458f6..a7bdb635 100644 --- a/config/crd/bases/kustomize.fluxcd.io_kustomizations.yaml +++ b/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml @@ -6,9 +6,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.3.0 creationTimestamp: null - name: kustomizations.kustomize.fluxcd.io + name: kustomizations.kustomize.toolkit.fluxcd.io spec: - group: kustomize.fluxcd.io + group: kustomize.toolkit.fluxcd.io names: kind: Kustomization listKind: KustomizationList diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 445b33d5..9dc1ef87 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -1,6 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- bases/kustomize.fluxcd.io_kustomizations.yaml +- bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml # +kubebuilder:scaffold:crdkustomizeresource diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index f784339a..ce82001e 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -5,6 +5,6 @@ resources: - ../crd - ../rbac - ../manager -- github.com/fluxcd/source-controller/config//crd?ref=v0.0.6 -- github.com/fluxcd/source-controller/config//manager?ref=v0.0.6 +- github.com/fluxcd/source-controller/config//crd?ref=v0.0.7 +- github.com/fluxcd/source-controller/config//manager?ref=v0.0.7 - namespace.yaml diff --git a/config/rbac/kustomization_editor_role.yaml b/config/rbac/kustomization_editor_role.yaml index c1dcd82b..c1c9e279 100644 --- a/config/rbac/kustomization_editor_role.yaml +++ b/config/rbac/kustomization_editor_role.yaml @@ -5,7 +5,7 @@ metadata: name: kustomization-editor-role rules: - apiGroups: - - kustomize.fluxcd.io + - kustomize.toolkit.fluxcd.io resources: - kustomizations verbs: @@ -17,7 +17,7 @@ rules: - update - watch - apiGroups: - - kustomize.fluxcd.io + - kustomize.toolkit.fluxcd.io resources: - kustomizations/status verbs: diff --git a/config/rbac/kustomization_viewer_role.yaml b/config/rbac/kustomization_viewer_role.yaml index f360d39d..cf83eba9 100644 --- a/config/rbac/kustomization_viewer_role.yaml +++ b/config/rbac/kustomization_viewer_role.yaml @@ -5,7 +5,7 @@ metadata: name: kustomization-viewer-role rules: - apiGroups: - - kustomize.fluxcd.io + - kustomize.toolkit.fluxcd.io resources: - kustomizations verbs: @@ -13,7 +13,7 @@ rules: - list - watch - apiGroups: - - kustomize.fluxcd.io + - kustomize.toolkit.fluxcd.io resources: - kustomizations/status verbs: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 7f678e61..2385c4ba 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -7,7 +7,7 @@ metadata: name: manager-role rules: - apiGroups: - - kustomize.fluxcd.io + - kustomize.toolkit.fluxcd.io resources: - kustomizations verbs: @@ -19,7 +19,7 @@ rules: - update - watch - apiGroups: - - kustomize.fluxcd.io + - kustomize.toolkit.fluxcd.io resources: - kustomizations/status verbs: @@ -27,7 +27,7 @@ rules: - patch - update - apiGroups: - - source.fluxcd.io + - source.toolkit.fluxcd.io resources: - gitrepositories verbs: @@ -35,7 +35,7 @@ rules: - list - watch - apiGroups: - - source.fluxcd.io + - source.toolkit.fluxcd.io resources: - gitrepositories/status verbs: diff --git a/config/samples/kustomize_v1alpha1_kustomization.yaml b/config/samples/kustomize_v1alpha1_kustomization.yaml index d00937b3..be0e2266 100644 --- a/config/samples/kustomize_v1alpha1_kustomization.yaml +++ b/config/samples/kustomize_v1alpha1_kustomization.yaml @@ -1,4 +1,4 @@ -apiVersion: kustomize.fluxcd.io/v1alpha1 +apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1 kind: Kustomization metadata: name: webapp-dev @@ -19,7 +19,7 @@ spec: namespace: webapp timeout: 2m --- -apiVersion: kustomize.fluxcd.io/v1alpha1 +apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1 kind: Kustomization metadata: name: webapp-production diff --git a/config/samples/source_v1alpha1_gitrepository.yaml b/config/samples/source_v1alpha1_gitrepository.yaml index 44ef6553..8d111465 100644 --- a/config/samples/source_v1alpha1_gitrepository.yaml +++ b/config/samples/source_v1alpha1_gitrepository.yaml @@ -1,4 +1,4 @@ -apiVersion: source.fluxcd.io/v1alpha1 +apiVersion: source.toolkit.fluxcd.io/v1alpha1 kind: GitRepository metadata: name: webapp-latest @@ -8,7 +8,7 @@ spec: ref: branch: master --- -apiVersion: source.fluxcd.io/v1alpha1 +apiVersion: source.toolkit.fluxcd.io/v1alpha1 kind: GitRepository metadata: name: webapp-releases diff --git a/config/testdata/dependencies/backend.yaml b/config/testdata/dependencies/backend.yaml index 99b3b391..cbbe4497 100644 --- a/config/testdata/dependencies/backend.yaml +++ b/config/testdata/dependencies/backend.yaml @@ -1,4 +1,4 @@ -apiVersion: kustomize.fluxcd.io/v1alpha1 +apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1 kind: Kustomization metadata: name: backend diff --git a/config/testdata/dependencies/common.yaml b/config/testdata/dependencies/common.yaml index 6b7ece94..ba221a07 100644 --- a/config/testdata/dependencies/common.yaml +++ b/config/testdata/dependencies/common.yaml @@ -1,4 +1,4 @@ -apiVersion: kustomize.fluxcd.io/v1alpha1 +apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1 kind: Kustomization metadata: name: common diff --git a/config/testdata/dependencies/frontend.yaml b/config/testdata/dependencies/frontend.yaml index a7acfce3..900346a1 100644 --- a/config/testdata/dependencies/frontend.yaml +++ b/config/testdata/dependencies/frontend.yaml @@ -1,4 +1,4 @@ -apiVersion: kustomize.fluxcd.io/v1alpha1 +apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1 kind: Kustomization metadata: name: frontend diff --git a/config/testdata/dependencies/source.yaml b/config/testdata/dependencies/source.yaml index 7ea5e9d4..0309df16 100644 --- a/config/testdata/dependencies/source.yaml +++ b/config/testdata/dependencies/source.yaml @@ -1,4 +1,4 @@ -apiVersion: source.fluxcd.io/v1alpha1 +apiVersion: source.toolkit.fluxcd.io/v1alpha1 kind: GitRepository metadata: name: webapp diff --git a/config/testdata/overlays/production.yaml b/config/testdata/overlays/production.yaml index 5c6660e1..5baba9f9 100644 --- a/config/testdata/overlays/production.yaml +++ b/config/testdata/overlays/production.yaml @@ -1,4 +1,4 @@ -apiVersion: kustomize.fluxcd.io/v1alpha1 +apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1 kind: Kustomization metadata: name: webapp-production @@ -19,7 +19,7 @@ spec: namespace: production timeout: 2m --- -apiVersion: source.fluxcd.io/v1alpha1 +apiVersion: source.toolkit.fluxcd.io/v1alpha1 kind: GitRepository metadata: name: webapp-releases diff --git a/config/testdata/overlays/staging.yaml b/config/testdata/overlays/staging.yaml index 2d4bac54..58a297cf 100644 --- a/config/testdata/overlays/staging.yaml +++ b/config/testdata/overlays/staging.yaml @@ -1,4 +1,4 @@ -apiVersion: kustomize.fluxcd.io/v1alpha1 +apiVersion: kustomize.toolkit.fluxcd.io/v1alpha1 kind: Kustomization metadata: name: webapp-staging @@ -19,7 +19,7 @@ spec: namespace: staging timeout: 2m --- -apiVersion: source.fluxcd.io/v1alpha1 +apiVersion: source.toolkit.fluxcd.io/v1alpha1 kind: GitRepository metadata: name: webapp-latest diff --git a/controllers/gitrepository_watcher.go b/controllers/gitrepository_watcher.go index c754a6ed..ecfa5c22 100644 --- a/controllers/gitrepository_watcher.go +++ b/controllers/gitrepository_watcher.go @@ -42,8 +42,8 @@ type GitRepositoryWatcher struct { Scheme *runtime.Scheme } -// +kubebuilder:rbac:groups=source.fluxcd.io,resources=gitrepositories,verbs=get;list;watch -// +kubebuilder:rbac:groups=source.fluxcd.io,resources=gitrepositories/status,verbs=get +// +kubebuilder:rbac:groups=source.toolkit.fluxcd.io,resources=gitrepositories,verbs=get;list;watch +// +kubebuilder:rbac:groups=source.toolkit.fluxcd.io,resources=gitrepositories/status,verbs=get func (r *GitRepositoryWatcher) Reconcile(req ctrl.Request) (ctrl.Result, error) { ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) diff --git a/controllers/kustomization_controller.go b/controllers/kustomization_controller.go index 6e78a0d8..5d02a755 100644 --- a/controllers/kustomization_controller.go +++ b/controllers/kustomization_controller.go @@ -60,8 +60,8 @@ type KustomizationReconciler struct { ExternalEventRecorder *recorder.EventRecorder } -// +kubebuilder:rbac:groups=kustomize.fluxcd.io,resources=kustomizations,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=kustomize.fluxcd.io,resources=kustomizations/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=kustomize.toolkit.fluxcd.io,resources=kustomizations,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=kustomize.toolkit.fluxcd.io,resources=kustomizations/status,verbs=get;update;patch func (r *KustomizationReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { ctx := context.Background() diff --git a/docs/api/kustomize.md b/docs/api/kustomize.md index 002ad573..94c0b59d 100644 --- a/docs/api/kustomize.md +++ b/docs/api/kustomize.md @@ -2,16 +2,16 @@
Packages:
-Package v1alpha1 contains API Schema definitions for the kustomize v1alpha1 API group
Resource Types: -Kustomization is the Schema for the kustomizations API.
apiVersion
kustomize.fluxcd.io/v1alpha1
+kustomize.toolkit.fluxcd.io/v1alpha1
spec
healthChecks
serviceAccount
sourceRef
status
(Appears on: -KustomizationStatus) +KustomizationStatus)
Condition contains condition information for a kustomization.
(Appears on: -KustomizationSpec) +KustomizationSpec)
CrossNamespaceObjectReference contains enough information to let you locate the typed referenced object at cluster level
@@ -370,11 +370,11 @@ string -(Appears on: -Kustomization) +Kustomization)
KustomizationSpec defines the desired state of a kustomization.
healthChecks
serviceAccount
sourceRef
(Appears on: -Kustomization) +Kustomization)
KustomizationStatus defines the observed state of a kustomization.
conditions
snapshot
(Appears on: -KustomizationSpec) +KustomizationSpec)
ServiceAccount defines a reference to a Kubernetes service account.
(Appears on: -KustomizationStatus) +KustomizationStatus)
Snapshot holds the metadata of the Kubernetes objects generated for a source revision
@@ -683,7 +683,7 @@ stringentries
(Appears on: -Snapshot) +Snapshot)
Snapshot holds the metadata of namespaced Kubernetes objects
@@ -741,13 +741,13 @@ map[string]string -[][]string
alias)(Appears on: -KustomizationSpec) +KustomizationSpec)
WorkloadReference defines a reference to a Deployment, DaemonSet or StatefulSet.