diff --git a/Makefile b/Makefile index 9563254..a3a552c 100644 --- a/Makefile +++ b/Makefile @@ -122,10 +122,10 @@ PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le docker-buildx: ## Build and push docker image for the manager for cross-platform support # copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross - - $(CONTAINER_TOOL) buildx create --name kubegres-new-builder - - $(CONTAINER_TOOL) buildx use kubegres-new-builder + - $(CONTAINER_TOOL) buildx create --name kubegres-builder + - $(CONTAINER_TOOL) buildx use kubegres-builder - $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross . - - $(CONTAINER_TOOL) buildx rm kubegres-new-builder + - $(CONTAINER_TOOL) buildx rm kubegres-builder rm Dockerfile.cross .PHONY: build-installer diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 860d3f4..99d4189 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -1,12 +1,12 @@ # Adds namespace to all resources. -namespace: kubegres-new-system +namespace: kubegres-system # Value of this field is prepended to the # names of all resources, e.g. a deployment named # "wordpress" becomes "alices-wordpress". # Note that it should also match with the prefix (text before '-') of the namespace # field above. -namePrefix: kubegres-new- +namePrefix: kubegres- # Labels to add to all resources and selectors. #labels: diff --git a/config/default/metrics_service.yaml b/config/default/metrics_service.yaml index c9f9e9b..9ec563c 100644 --- a/config/default/metrics_service.yaml +++ b/config/default/metrics_service.yaml @@ -3,7 +3,7 @@ kind: Service metadata: labels: control-plane: controller-manager - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-service namespace: system diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 1a6147c..b69f7d6 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -3,7 +3,7 @@ kind: Namespace metadata: labels: control-plane: controller-manager - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres app.kubernetes.io/managed-by: kustomize name: system --- @@ -14,7 +14,7 @@ metadata: namespace: system labels: control-plane: controller-manager - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres app.kubernetes.io/managed-by: kustomize spec: selector: diff --git a/config/network-policy/allow-metrics-traffic.yaml b/config/network-policy/allow-metrics-traffic.yaml index 32cafa7..76446a3 100644 --- a/config/network-policy/allow-metrics-traffic.yaml +++ b/config/network-policy/allow-metrics-traffic.yaml @@ -5,7 +5,7 @@ apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: labels: - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres app.kubernetes.io/managed-by: kustomize name: allow-metrics-traffic namespace: system diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index 19c0448..dd64f89 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -4,7 +4,7 @@ kind: ServiceMonitor metadata: labels: control-plane: controller-manager - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-monitor namespace: system diff --git a/config/rbac/kubegres_editor_role.yaml b/config/rbac/kubegres_editor_role.yaml index f62b1e2..81a6eaa 100644 --- a/config/rbac/kubegres_editor_role.yaml +++ b/config/rbac/kubegres_editor_role.yaml @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres app.kubernetes.io/managed-by: kustomize name: kubegres-editor-role rules: diff --git a/config/rbac/kubegres_viewer_role.yaml b/config/rbac/kubegres_viewer_role.yaml index c7c4d10..4d71303 100644 --- a/config/rbac/kubegres_viewer_role.yaml +++ b/config/rbac/kubegres_viewer_role.yaml @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres app.kubernetes.io/managed-by: kustomize name: kubegres-viewer-role rules: diff --git a/config/rbac/leader_election_role.yaml b/config/rbac/leader_election_role.yaml index d180e73..60713bd 100644 --- a/config/rbac/leader_election_role.yaml +++ b/config/rbac/leader_election_role.yaml @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: labels: - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres app.kubernetes.io/managed-by: kustomize name: leader-election-role rules: diff --git a/config/rbac/leader_election_role_binding.yaml b/config/rbac/leader_election_role_binding.yaml index 7d3ad57..c959100 100644 --- a/config/rbac/leader_election_role_binding.yaml +++ b/config/rbac/leader_election_role_binding.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres app.kubernetes.io/managed-by: kustomize name: leader-election-rolebinding roleRef: diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml index d6f7c93..cb502a7 100644 --- a/config/rbac/role_binding.yaml +++ b/config/rbac/role_binding.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres app.kubernetes.io/managed-by: kustomize name: manager-rolebinding roleRef: diff --git a/config/rbac/service_account.yaml b/config/rbac/service_account.yaml index 0e2cba2..5ae062b 100644 --- a/config/rbac/service_account.yaml +++ b/config/rbac/service_account.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ServiceAccount metadata: labels: - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres app.kubernetes.io/managed-by: kustomize name: controller-manager namespace: system diff --git a/config/samples/kubegres_v1_kubegres.yaml b/config/samples/kubegres_v1_kubegres.yaml index ca01f9a..2a77908 100644 --- a/config/samples/kubegres_v1_kubegres.yaml +++ b/config/samples/kubegres_v1_kubegres.yaml @@ -2,7 +2,7 @@ apiVersion: kubegres.reactive-tech.io/v1 kind: Kubegres metadata: labels: - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres app.kubernetes.io/managed-by: kustomize name: kubegres-sample spec: diff --git a/kubegres.yaml b/kubegres.yaml index eaad09c..6570a13 100644 --- a/kubegres.yaml +++ b/kubegres.yaml @@ -3,9 +3,9 @@ kind: Namespace metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres control-plane: controller-manager - name: kubegres-new-system + name: kubegres-system --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -4075,18 +4075,18 @@ kind: ServiceAccount metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: kubegres-new - name: kubegres-new-controller-manager - namespace: kubegres-new-system + app.kubernetes.io/name: kubegres + name: kubegres-controller-manager + namespace: kubegres-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: kubegres-new - name: kubegres-new-leader-election-role - namespace: kubegres-new-system + app.kubernetes.io/name: kubegres + name: kubegres-leader-election-role + namespace: kubegres-system rules: - apiGroups: - "" @@ -4125,8 +4125,8 @@ kind: ClusterRole metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: kubegres-new - name: kubegres-new-kubegres-editor-role + app.kubernetes.io/name: kubegres + name: kubegres-kubegres-editor-role rules: - apiGroups: - kubegres.reactive-tech.io @@ -4152,8 +4152,8 @@ kind: ClusterRole metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: kubegres-new - name: kubegres-new-kubegres-viewer-role + app.kubernetes.io/name: kubegres + name: kubegres-kubegres-viewer-role rules: - apiGroups: - kubegres.reactive-tech.io @@ -4173,7 +4173,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: kubegres-new-manager-role + name: kubegres-manager-role rules: - apiGroups: - "" @@ -4253,7 +4253,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: kubegres-new-metrics-auth-role + name: kubegres-metrics-auth-role rules: - apiGroups: - authentication.k8s.io @@ -4271,7 +4271,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: kubegres-new-metrics-reader + name: kubegres-metrics-reader rules: - nonResourceURLs: - /metrics @@ -4283,56 +4283,56 @@ kind: RoleBinding metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: kubegres-new - name: kubegres-new-leader-election-rolebinding - namespace: kubegres-new-system + app.kubernetes.io/name: kubegres + name: kubegres-leader-election-rolebinding + namespace: kubegres-system roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: kubegres-new-leader-election-role + name: kubegres-leader-election-role subjects: - kind: ServiceAccount - name: kubegres-new-controller-manager - namespace: kubegres-new-system + name: kubegres-controller-manager + namespace: kubegres-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: kubegres-new - name: kubegres-new-manager-rolebinding + app.kubernetes.io/name: kubegres + name: kubegres-manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: kubegres-new-manager-role + name: kubegres-manager-role subjects: - kind: ServiceAccount - name: kubegres-new-controller-manager - namespace: kubegres-new-system + name: kubegres-controller-manager + namespace: kubegres-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: kubegres-new-metrics-auth-rolebinding + name: kubegres-metrics-auth-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: kubegres-new-metrics-auth-role + name: kubegres-metrics-auth-role subjects: - kind: ServiceAccount - name: kubegres-new-controller-manager - namespace: kubegres-new-system + name: kubegres-controller-manager + namespace: kubegres-system --- apiVersion: v1 kind: Service metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres control-plane: controller-manager - name: kubegres-new-controller-manager-metrics-service - namespace: kubegres-new-system + name: kubegres-controller-manager-metrics-service + namespace: kubegres-system spec: ports: - name: https @@ -4347,10 +4347,10 @@ kind: Deployment metadata: labels: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: kubegres-new + app.kubernetes.io/name: kubegres control-plane: controller-manager - name: kubegres-new-controller-manager - namespace: kubegres-new-system + name: kubegres-controller-manager + namespace: kubegres-system spec: replicas: 1 selector: @@ -4398,5 +4398,5 @@ spec: - ALL securityContext: runAsNonRoot: true - serviceAccountName: kubegres-new-controller-manager + serviceAccountName: kubegres-controller-manager terminationGracePeriodSeconds: 10