Skip to content

Commit

Permalink
fix(config):update config manifests
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Zou <szou@vmware.com>
  • Loading branch information
steven-zou committed Nov 27, 2020
1 parent 8b06af2 commit 41b8eda
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 25 deletions.
2 changes: 1 addition & 1 deletion config/default/manager_auth_proxy_patch.yaml
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: harbor-operator
spec:
template:
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_prometheus_metrics_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: harbor-operator
spec:
template:
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/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: harbor-operator
spec:
template:
spec:
Expand Down
8 changes: 4 additions & 4 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: harbor-operator
labels:
control-plane: controller-manager
control-plane: harbor-operator
spec:
selector:
matchLabels:
control-plane: controller-manager
control-plane: harbor-operator
template:
metadata:
labels:
control-plane: controller-manager
control-plane: harbor-operator
spec:
containers:
- command:
Expand Down
2 changes: 1 addition & 1 deletion config/manager/patches-configuration.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: harbor-operator
spec:
template:
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/webhook/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
- port: 443
targetPort: 9443
selector:
control-plane: controller-manager
control-plane: harbor-operator
40 changes: 29 additions & 11 deletions manifests/cluster/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2042,6 +2042,7 @@ spec:
type: array
type: object
database:
description: Skip OpenAPI schema validation Use validating webhook to do verification (field required)
properties:
hosts:
items:
Expand Down Expand Up @@ -2170,6 +2171,7 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
imageChartStorage:
description: Skip OpenAPI schema validation Use validating webhook to do verification (field required)
properties:
filesystem:
description: 'FileSystem is an implementation of the storagedriver.StorageDriver interface which uses the local filesystem. The local filesystem can be a remote volume. See: https://docs.docker.com/registry/storage-drivers/filesystem/'
Expand Down Expand Up @@ -2944,6 +2946,7 @@ spec:
- url
type: object
redis:
description: Skip OpenAPI schema validation Use validating webhook to do verification (field required)
properties:
certificateRef:
description: Secret containing the client certificate to authenticate with.
Expand Down Expand Up @@ -3163,13 +3166,10 @@ spec:
default: RollingUpdate
type: string
required:
- database
- encryptionKeyRef
- expose
- externalURL
- harborAdminPasswordRef
- imageChartStorage
- redis
type: object
status:
description: HarborClusterStatus defines the observed state of HarborCluster
Expand Down Expand Up @@ -3435,6 +3435,7 @@ spec:
type: array
type: object
database:
description: Skip OpenAPI schema validation Use validating webhook to do verification (field required)
properties:
hosts:
items:
Expand Down Expand Up @@ -3563,6 +3564,7 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
imageChartStorage:
description: Skip OpenAPI schema validation Use validating webhook to do verification (field required)
properties:
filesystem:
description: 'FileSystem is an implementation of the storagedriver.StorageDriver interface which uses the local filesystem. The local filesystem can be a remote volume. See: https://docs.docker.com/registry/storage-drivers/filesystem/'
Expand Down Expand Up @@ -4050,6 +4052,7 @@ spec:
- url
type: object
redis:
description: Skip OpenAPI schema validation Use validating webhook to do verification (field required)
properties:
certificateRef:
description: Secret containing the client certificate to authenticate with.
Expand Down Expand Up @@ -4269,13 +4272,10 @@ spec:
default: RollingUpdate
type: string
required:
- database
- encryptionKeyRef
- expose
- externalURL
- harborAdminPasswordRef
- imageChartStorage
- redis
type: object
status:
description: ComponentStatus represents the current status of the resource. https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
Expand Down Expand Up @@ -15441,7 +15441,7 @@ spec:
- port: 443
targetPort: 9443
selector:
control-plane: controller-manager
control-plane: harbor-operator
---
apiVersion: apps/v1
kind: Deployment
Expand All @@ -15451,21 +15451,21 @@ metadata:
goharbor.io/deploy-mode: cluster
goharbor.io/operator-version: v1.0.0
labels:
control-plane: controller-manager
name: controller-manager
control-plane: harbor-operator
name: harbor-operator
namespace: harbor-operator-ns
spec:
selector:
matchLabels:
control-plane: controller-manager
control-plane: harbor-operator
template:
metadata:
annotations:
goharbor.io/deploy-engine: Kustomization
goharbor.io/deploy-mode: cluster
goharbor.io/operator-version: v1.0.0
labels:
control-plane: controller-manager
control-plane: harbor-operator
spec:
containers:
- args:
Expand Down Expand Up @@ -15708,6 +15708,24 @@ webhooks:
- UPDATE
resources:
- harbors
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: harbor-operator-ns
path: /validate-goharbor-io-v1alpha2-harborcluster
failurePolicy: Fail
name: vharborcluster.kb.io
rules:
- apiGroups:
- goharbor.io
apiVersions:
- v1alpha2
operations:
- CREATE
- UPDATE
resources:
- harborclusters
- clientConfig:
caBundle: Cg==
service:
Expand Down
11 changes: 6 additions & 5 deletions pkg/setup/webhooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ const (
)

var webhooksBuilder = map[controllers.Controller]WebHook{
controllers.Harbor: &goharborv1alpha2.Harbor{},
controllers.JobService: &goharborv1alpha2.JobService{},
controllers.Registry: &goharborv1alpha2.Registry{},
controllers.NotaryServer: &goharborv1alpha2.NotaryServer{},
controllers.NotarySigner: &goharborv1alpha2.NotarySigner{},
controllers.Harbor: &goharborv1alpha2.Harbor{},
controllers.JobService: &goharborv1alpha2.JobService{},
controllers.Registry: &goharborv1alpha2.Registry{},
controllers.NotaryServer: &goharborv1alpha2.NotaryServer{},
controllers.NotarySigner: &goharborv1alpha2.NotarySigner{},
controllers.HarborCluster: &goharborv1alpha2.HarborCluster{},
}

type WebHook interface {
Expand Down

0 comments on commit 41b8eda

Please sign in to comment.