diff --git a/config/yurt-app-manager/default/kustomization.yaml b/config/yurt-app-manager/default/kustomization.yaml index 5011cccc4ab..a81efc59ab8 100644 --- a/config/yurt-app-manager/default/kustomization.yaml +++ b/config/yurt-app-manager/default/kustomization.yaml @@ -6,7 +6,7 @@ namespace: kube-system # "wordpress" becomes "alices-wordpress". # Note that it should also match with the prefix (text before '-') of the namespace # field above. -namePrefix: yurtapp- +namePrefix: yurt-app- # Labels to add to all resources and selectors. #commonLabels: @@ -26,7 +26,7 @@ bases: patchesStrategicMerge: # Protect the /metrics endpoint by putting it behind auth. - # If you want your controller-manager to expose the /metrics + # If you want your yurt-app-manager to expose the /metrics # endpoint w/o any authn/z, please comment the following line. # - manager_auth_proxy_patch.yaml diff --git a/config/yurt-app-manager/default/manager_auth_proxy_patch.yaml b/config/yurt-app-manager/default/manager_auth_proxy_patch.yaml index 77e743d1c1c..02b5c2f4f66 100644 --- a/config/yurt-app-manager/default/manager_auth_proxy_patch.yaml +++ b/config/yurt-app-manager/default/manager_auth_proxy_patch.yaml @@ -3,7 +3,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: controller-manager + name: manager namespace: system spec: template: diff --git a/config/yurt-app-manager/default/manager_webhook_patch.yaml b/config/yurt-app-manager/default/manager_webhook_patch.yaml index 0f8b91111cf..078edcd5fd0 100644 --- a/config/yurt-app-manager/default/manager_webhook_patch.yaml +++ b/config/yurt-app-manager/default/manager_webhook_patch.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: controller-manager + name: manager namespace: system spec: template: @@ -20,4 +20,4 @@ spec: - name: cert secret: defaultMode: 420 - secretName: yurtapp-webhook-certs + secretName: yurt-app-webhook-certs diff --git a/config/yurt-app-manager/manager/manager.yaml b/config/yurt-app-manager/manager/manager.yaml index 2216cc3306f..57a8ce899f9 100644 --- a/config/yurt-app-manager/manager/manager.yaml +++ b/config/yurt-app-manager/manager/manager.yaml @@ -2,25 +2,25 @@ apiVersion: v1 kind: Namespace metadata: labels: - control-plane: controller-manager + control-plane: yurt-app-manager name: system --- apiVersion: apps/v1 kind: Deployment metadata: - name: controller-manager + name: manager namespace: system labels: - control-plane: controller-manager + control-plane: yurt-app-manager spec: selector: matchLabels: - control-plane: controller-manager + control-plane: yurt-app-manager replicas: 1 template: metadata: labels: - control-plane: controller-manager + control-plane: yurt-app-manager spec: tolerations: nodeSelector: diff --git a/config/yurt-app-manager/manager/patches.yaml b/config/yurt-app-manager/manager/patches.yaml index f6c37038720..a4c4b2a0c44 100644 --- a/config/yurt-app-manager/manager/patches.yaml +++ b/config/yurt-app-manager/manager/patches.yaml @@ -2,6 +2,6 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: controller-manager + name: manager namespace: system diff --git a/config/yurt-app-manager/prometheus/monitor.yaml b/config/yurt-app-manager/prometheus/monitor.yaml index 9b8047b760f..e7cb675aaf3 100644 --- a/config/yurt-app-manager/prometheus/monitor.yaml +++ b/config/yurt-app-manager/prometheus/monitor.yaml @@ -4,8 +4,8 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: labels: - control-plane: controller-manager - name: controller-manager-metrics-monitor + control-plane: yurt-app-manager + name: manager-metrics-monitor namespace: system spec: endpoints: @@ -13,4 +13,4 @@ spec: port: https selector: matchLabels: - control-plane: controller-manager + control-plane: yurt-app-manager diff --git a/config/yurt-app-manager/rbac/auth_proxy_service.yaml b/config/yurt-app-manager/rbac/auth_proxy_service.yaml index 6cf656be149..8b34c0bb821 100644 --- a/config/yurt-app-manager/rbac/auth_proxy_service.yaml +++ b/config/yurt-app-manager/rbac/auth_proxy_service.yaml @@ -2,8 +2,8 @@ apiVersion: v1 kind: Service metadata: labels: - control-plane: controller-manager - name: controller-manager-metrics-service + control-plane: yurt-app-manager + name: manager-metrics-service namespace: system spec: ports: @@ -11,4 +11,4 @@ spec: port: 8443 targetPort: https selector: - control-plane: controller-manager + control-plane: yurt-app-manager diff --git a/config/yurt-app-manager/release/yurt-app-manager-v0.3.0.yaml b/config/yurt-app-manager/release/yurt-app-manager-v0.3.0.yaml index 050c8f7dfce..e7717ed70bd 100644 --- a/config/yurt-app-manager/release/yurt-app-manager-v0.3.0.yaml +++ b/config/yurt-app-manager/release/yurt-app-manager-v0.3.0.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Namespace metadata: labels: - control-plane: controller-manager + control-plane: yurt-app-manager name: system --- apiVersion: apiextensions.k8s.io/v1beta1 @@ -350,7 +350,7 @@ status: apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: yurtapp-leader-election-role + name: yurt-app-leader-election-role namespace: kube-system rules: - apiGroups: @@ -384,7 +384,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: creationTimestamp: null - name: yurtapp-manager-role + name: yurt-app-manager-role rules: - apiGroups: - admissionregistration.k8s.io @@ -564,12 +564,12 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: yurtapp-leader-election-rolebinding + name: yurt-app-leader-election-rolebinding namespace: kube-system roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: yurtapp-leader-election-role + name: yurt-app-leader-election-role subjects: - kind: ServiceAccount name: default @@ -578,11 +578,11 @@ subjects: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: yurtapp-manager-rolebinding + name: yurt-app-manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: yurtapp-manager-role + name: yurt-app-manager-role subjects: - kind: ServiceAccount name: default @@ -591,37 +591,37 @@ subjects: apiVersion: v1 kind: Secret metadata: - name: yurtapp-webhook-certs + name: yurt-app-webhook-certs namespace: kube-system --- apiVersion: v1 kind: Service metadata: - name: yurtapp-webhook-service + name: yurt-app-webhook-service namespace: kube-system spec: ports: - port: 443 targetPort: 9876 selector: - control-plane: controller-manager + control-plane: yurt-app-manager --- apiVersion: apps/v1 kind: Deployment metadata: labels: - control-plane: controller-manager - name: yurtapp-controller-manager + control-plane: yurt-app-manager + name: yurt-app-manager namespace: kube-system spec: replicas: 1 selector: matchLabels: - control-plane: controller-manager + control-plane: yurt-app-manager template: metadata: labels: - control-plane: controller-manager + control-plane: yurt-app-manager spec: containers: - args: @@ -645,18 +645,18 @@ spec: - name: cert secret: defaultMode: 420 - secretName: yurtapp-webhook-certs + secretName: yurt-app-webhook-certs --- apiVersion: admissionregistration.k8s.io/v1beta1 kind: MutatingWebhookConfiguration metadata: creationTimestamp: null - name: yurtapp-mutating-webhook-configuration + name: yurt-app-mutating-webhook-configuration webhooks: - clientConfig: caBundle: Cg== service: - name: yurtapp-webhook-service + name: yurt-app-webhook-service namespace: kube-system path: /mutate-apps-openyurt-io-v1alpha1-nodepool failurePolicy: Fail @@ -674,7 +674,7 @@ webhooks: - clientConfig: caBundle: Cg== service: - name: yurtapp-webhook-service + name: yurt-app-webhook-service namespace: kube-system path: /mutate-apps-openyurt-io-v1alpha1-uniteddeployment failurePolicy: Fail @@ -694,12 +694,12 @@ apiVersion: admissionregistration.k8s.io/v1beta1 kind: ValidatingWebhookConfiguration metadata: creationTimestamp: null - name: yurtapp-validating-webhook-configuration + name: yurt-app-validating-webhook-configuration webhooks: - clientConfig: caBundle: Cg== service: - name: yurtapp-webhook-service + name: yurt-app-webhook-service namespace: kube-system path: /validate-apps-openyurt-io-v1alpha1-nodepool failurePolicy: Fail @@ -718,7 +718,7 @@ webhooks: - clientConfig: caBundle: Cg== service: - name: yurtapp-webhook-service + name: yurt-app-webhook-service namespace: kube-system path: /validate-apps-openyurt-io-v1alpha1-uniteddeployment failurePolicy: Fail diff --git a/config/yurt-app-manager/webhook/service.yaml b/config/yurt-app-manager/webhook/service.yaml index a68b339ba32..3c18dc11f44 100644 --- a/config/yurt-app-manager/webhook/service.yaml +++ b/config/yurt-app-manager/webhook/service.yaml @@ -9,4 +9,4 @@ spec: - port: 443 targetPort: 9876 selector: - control-plane: controller-manager + control-plane: yurt-app-manager diff --git a/pkg/yurtappmanager/webhook/util/configuration/configuration.go b/pkg/yurtappmanager/webhook/util/configuration/configuration.go index 12b59afd18b..1f1e680a51e 100644 --- a/pkg/yurtappmanager/webhook/util/configuration/configuration.go +++ b/pkg/yurtappmanager/webhook/util/configuration/configuration.go @@ -31,8 +31,8 @@ import ( ) const ( - mutatingWebhookConfigurationName = "yurtapp-mutating-webhook-configuration" - validatingWebhookConfigurationName = "yurtapp-validating-webhook-configuration" + mutatingWebhookConfigurationName = "yurt-app-mutating-webhook-configuration" + validatingWebhookConfigurationName = "yurt-app-validating-webhook-configuration" ) func Ensure(c client.Client, handlers map[string]webhookutil.Handler, caBundle []byte) error { diff --git a/pkg/yurtappmanager/webhook/util/controller/webhook_controller.go b/pkg/yurtappmanager/webhook/util/controller/webhook_controller.go index c609f02168e..cd97b6ed3ea 100644 --- a/pkg/yurtappmanager/webhook/util/controller/webhook_controller.go +++ b/pkg/yurtappmanager/webhook/util/controller/webhook_controller.go @@ -46,8 +46,8 @@ import ( ) var ( - mutatingWebhookConfigurationName = "yurtapp-mutating-webhook-configuration" - validatingWebhookConfigurationName = "yurtapp-validating-webhook-configuration" + mutatingWebhookConfigurationName = "yurt-app-mutating-webhook-configuration" + validatingWebhookConfigurationName = "yurt-app-validating-webhook-configuration" namespace = webhookutil.GetNamespace() secretName = webhookutil.GetSecretName() diff --git a/pkg/yurtappmanager/webhook/util/util.go b/pkg/yurtappmanager/webhook/util/util.go index 62bc6ba883a..8564b60528e 100644 --- a/pkg/yurtappmanager/webhook/util/util.go +++ b/pkg/yurtappmanager/webhook/util/util.go @@ -39,14 +39,14 @@ func GetSecretName() string { if name := os.Getenv("SECRET_NAME"); len(name) > 0 { return name } - return "yurtapp-webhook-certs" + return "yurt-app-webhook-certs" } func GetServiceName() string { if name := os.Getenv("SERVICE_NAME"); len(name) > 0 { return name } - return "yurtapp-webhook-service" + return "yurt-app-webhook-service" } func GetPort() int { @@ -65,5 +65,5 @@ func GetCertDir() string { if p := os.Getenv("WEBHOOK_CERT_DIR"); len(p) > 0 { return p } - return "/tmp/yurtapp-webhook-certs" + return "/tmp/yurt-app-webhook-certs" }