Skip to content

Commit

Permalink
remove namespace creation (#1) (antrea-io#2563)
Browse files Browse the repository at this point in the history
1. remove namespace in config/manager/manager.yaml, so we won't have
a `kube-system` namespace definition in multi-cluster.yaml
2. use `KUSTOMIZE = $(shell pwd)/bin/kustomize` in Makefile,
   otherwise,it will do nothing if KUSTOMIZE is empty by `shell which kustomize`
3. add a common label `app: antrea` for all resources
4. other changes are auto-generated by `make manifests`

Signed-off-by: Lan Luo <[email protected]>
  • Loading branch information
luolanzone committed Jan 16, 2022
1 parent f5c7d4e commit 9247c60
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 34 deletions.
3 changes: 1 addition & 2 deletions multicluster/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/[email protected])

#KUSTOMIZE = $(shell pwd)/bin/kustomize
KUSTOMIZE = $(shell which kustomize)
KUSTOMIZE = $(shell pwd)/bin/kustomize

kustomize: ## Download kustomize locally if necessary.
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- name: v1alpha1
schema:
openAPIV3Schema:
description: ClusterSet is the Schema for the clustersets API
description: ClusterSet is the Schema for the clustersets API.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- name: v1alpha1
schema:
openAPIV3Schema:
description: ResourceExport is the Schema for the resourceexports API
description: ResourceExport is the Schema for the resourceexports API.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand All @@ -34,7 +34,7 @@ spec:
metadata:
type: object
spec:
description: ResourceExportSpec defines the desired state of ResourceExport
description: ResourceExportSpec defines the desired state of ResourceExport.
properties:
clusterID:
description: ClusterID specifies the member cluster this resource
Expand Down Expand Up @@ -654,28 +654,28 @@ spec:
type: object
type: object
status:
description: ResourceExportStatus defines the observed state of ResourceExport
description: ResourceExportStatus defines the observed state of ResourceExport.
properties:
conditions:
items:
description: ResourceExportCondition indicates the readiness condition
of the ResourceExport
of the ResourceExport.
properties:
lastTransitionTime:
description: Last time the condition transited from one status
to another
to another.
format: date-time
type: string
message:
description: A human readable message indicating details about
the transition
the transition.
type: string
reason:
description: Unique, one-word, CamelCase reason for the condition's
last transition.
type: string
status:
description: Status of the condition, one of True, False, Unknown
description: Status of the condition, one of True, False, Unknown.
type: string
type:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- name: v1alpha1
schema:
openAPIV3Schema:
description: ResourceImport is the Schema for the resourceimports API
description: ResourceImport is the Schema for the resourceimports API.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand All @@ -34,7 +34,7 @@ spec:
metadata:
type: object
spec:
description: ResourceImportSpec defines the desired state of ResourceImport
description: ResourceImportSpec defines the desired state of ResourceImport.
properties:
clusterID:
description: ClusterIDs specifies the member clusters this resource
Expand Down Expand Up @@ -433,37 +433,37 @@ spec:
type: object
type: object
status:
description: ResourceImportStatus defines the observed state of ResourceImport
description: ResourceImportStatus defines the observed state of ResourceImport.
properties:
clusterStatuses:
items:
description: ResourceImportClusterStatus indicates the readiness
status of the ResourceImport in clusters
status of the ResourceImport in clusters.
properties:
clusterID:
description: ClusterID is the unique identifier of this cluster.
type: string
conditions:
items:
description: ResourceImportCondition indicates the condition
of the ResourceImport in a cluster
of the ResourceImport in a cluster.
properties:
lastTransitionTime:
description: Last time the condition transited from one
status to another
status to another.
format: date-time
type: string
message:
description: A human readable message indicating details
about the transition
about the transition.
type: string
reason:
description: Unique, one-word, CamelCase reason for the
condition's last transition.
type: string
status:
description: Status of the condition, one of True, False,
Unknown
Unknown.
type: string
type:
type: string
Expand Down
4 changes: 2 additions & 2 deletions multicluster/config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ namespace: kube-system
namePrefix: antrea-multicluster-

# Labels to add to all resources and selectors.
#commonLabels:
# someName: someValue
commonLabels:
app: antrea

bases:
- ../crd
Expand Down
7 changes: 0 additions & 7 deletions multicluster/config/manager/manager.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
name: system
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
7 changes: 0 additions & 7 deletions multicluster/config/multi-cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
name: kube-system
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down

0 comments on commit 9247c60

Please sign in to comment.