Skip to content

Commit

Permalink
change yurt app manager yaml (#191)
Browse files Browse the repository at this point in the history
Signed-off-by: kadisi <[email protected]>
  • Loading branch information
kadisi authored Jan 7, 2021
1 parent cb7a10f commit e3edff8
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 46 deletions.
4 changes: 2 additions & 2 deletions config/yurt-app-manager/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: manager
namespace: system
spec:
template:
Expand Down
4 changes: 2 additions & 2 deletions config/yurt-app-manager/default/manager_webhook_patch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: manager
namespace: system
spec:
template:
Expand All @@ -20,4 +20,4 @@ spec:
- name: cert
secret:
defaultMode: 420
secretName: yurtapp-webhook-certs
secretName: yurt-app-webhook-certs
10 changes: 5 additions & 5 deletions config/yurt-app-manager/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion config/yurt-app-manager/manager/patches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: manager
namespace: system

6 changes: 3 additions & 3 deletions config/yurt-app-manager/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ 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:
- path: /metrics
port: https
selector:
matchLabels:
control-plane: controller-manager
control-plane: yurt-app-manager
6 changes: 3 additions & 3 deletions config/yurt-app-manager/rbac/auth_proxy_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ 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:
- name: https
port: 8443
targetPort: https
selector:
control-plane: controller-manager
control-plane: yurt-app-manager
42 changes: 21 additions & 21 deletions config/yurt-app-manager/release/yurt-app-manager-v0.3.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config/yurt-app-manager/webhook/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ spec:
- port: 443
targetPort: 9876
selector:
control-plane: controller-manager
control-plane: yurt-app-manager
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions pkg/yurtappmanager/webhook/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"
}

0 comments on commit e3edff8

Please sign in to comment.