Skip to content

Commit 06dc558

Browse files
authored
Update api kind and crd (#3)
* travis setup * check travis * add main branch * add cluster-curator api * update travis file * add sonar properties * update token in travis.yaml * fix copyright * update api * update api * update crd and api * update copyright * change crd * add build/bin * Update kind and crd * update crd * remove build image
1 parent bfa64b9 commit 06dc558

7 files changed

Lines changed: 137 additions & 150 deletions

File tree

.travis.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ jobs:
3737
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export COMPONENT_TAG_EXTENSION="-PR${TRAVIS_PULL_REQUEST}-${TRAVIS_COMMIT}"; fi;
3838
- make sonar/go
3939

40-
- stage: build
41-
name: "build image"
42-
script:
43-
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export COMPONENT_TAG_EXTENSION="-PR${TRAVIS_PULL_REQUEST}-${TRAVIS_COMMIT}"; fi;
44-
- make component/init
45-
- make check
46-
- make component/build # to remove overhead and keep output clean
47-
- make component/push
48-
- make security/scans
40+
# - stage: build
41+
# name: "build image"
42+
# script:
43+
# - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export COMPONENT_TAG_EXTENSION="-PR${TRAVIS_PULL_REQUEST}-${TRAVIS_COMMIT}"; fi;
44+
# - make component/init
45+
# - make check
46+
# - make component/build # to remove overhead and keep output clean
47+
# - make component/push
48+
# - make security/scans
4949

5050
# - stage: build
5151
# name: "build and push coverage image"

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ ifeq (, $(shell which controller-gen))
9595
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
9696
cd $$CONTROLLER_GEN_TMP_DIR ;\
9797
go mod init tmp ;\
98-
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.0 ;\
98+
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.3.0 ;\
9999
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
100100
}
101101
CONTROLLER_GEN=$(GOBIN)/controller-gen
@@ -106,7 +106,7 @@ endif
106106
.PHONY: manifests
107107
## Generate manifests e.g. CRD, RBAC etc.
108108
manifests: controller-gen
109-
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
109+
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role output:crd:artifacts:config=deploy/crd/bases
110110

111111
.PHONY: generate
112112
# Generate code

deploy/crds/cluster.open-cluster-management.io_clustercurators_crd.yaml

Lines changed: 61 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -40,102 +40,83 @@ spec:
4040
type: string
4141
job:
4242
description: Jobs holds the job specifications
43-
items:
44-
description: JobSpec holds desired configuration to create the job
45-
properties:
46-
image:
47-
description: image represents image which will be used to run
48-
a job OPTIONAL required if NOT ansible
49-
type: string
50-
name:
51-
description: name represents the name of the job
52-
type: string
53-
runOnAction:
54-
description: RunOnAction represents on which actoin this job
55-
should be executed action are create/import-only/destroy/detach
56-
type: string
57-
type:
58-
description: type represents type of job
59-
type: string
60-
values:
61-
additionalProperties:
62-
type: string
63-
description: Values represents neccasary fields required to
64-
exceute the job Values apiextensions.JSON `json:"values,omitempty"`
65-
type: object
66-
type: object
67-
type: array
43+
properties:
44+
image:
45+
description: image represents image which will be used to run
46+
a job OPTIONAL required if NOT ansible
47+
type: string
48+
name:
49+
description: name represents the name of the job
50+
type: string
51+
runOnAction:
52+
description: RunOnAction represents on which actoin this job should
53+
be executed action are create/import-only/destroy/detach
54+
type: string
55+
type:
56+
description: type represents type of job
57+
type: string
58+
values:
59+
description: Values represents necassary fields required to exceute
60+
the job
61+
x-kubernetes-preserve-unknown-fields: true
62+
type: object
6863
postJobs:
6964
description: PostJobs holds the job specifications
70-
items:
71-
description: JobSpec holds desired configuration to create the job
72-
properties:
73-
image:
74-
description: image represents image which will be used to run
75-
a job OPTIONAL required if NOT ansible
76-
type: string
77-
name:
78-
description: name represents the name of the job
79-
type: string
80-
runOnAction:
81-
description: RunOnAction represents on which actoin this job
82-
should be executed action are create/import-only/destroy/detach
83-
type: string
84-
type:
85-
description: type represents type of job
86-
type: string
87-
values:
88-
additionalProperties:
89-
type: string
90-
description: Values represents neccasary fields required to
91-
exceute the job Values apiextensions.JSON `json:"values,omitempty"`
92-
type: object
93-
type: object
94-
type: array
65+
properties:
66+
image:
67+
description: image represents image which will be used to run
68+
a job OPTIONAL required if NOT ansible
69+
type: string
70+
name:
71+
description: name represents the name of the job
72+
type: string
73+
runOnAction:
74+
description: RunOnAction represents on which actoin this job should
75+
be executed action are create/import-only/destroy/detach
76+
type: string
77+
type:
78+
description: type represents type of job
79+
type: string
80+
values:
81+
description: Values represents necassary fields required to exceute
82+
the job
83+
x-kubernetes-preserve-unknown-fields: true
84+
type: object
9585
preJobs:
9686
description: PreJobs holds the job specifications
97-
items:
98-
description: JobSpec holds desired configuration to create the job
99-
properties:
100-
image:
101-
description: image represents image which will be used to run
102-
a job OPTIONAL required if NOT ansible
103-
type: string
104-
name:
105-
description: name represents the name of the job
106-
type: string
107-
runOnAction:
108-
description: RunOnAction represents on which actoin this job
109-
should be executed action are create/import-only/destroy/detach
110-
type: string
111-
type:
112-
description: type represents type of job
113-
type: string
114-
values:
115-
additionalProperties:
116-
type: string
117-
description: Values represents neccasary fields required to
118-
exceute the job Values apiextensions.JSON `json:"values,omitempty"`
119-
type: object
120-
type: object
121-
type: array
87+
properties:
88+
image:
89+
description: image represents image which will be used to run
90+
a job OPTIONAL required if NOT ansible
91+
type: string
92+
name:
93+
description: name represents the name of the job
94+
type: string
95+
runOnAction:
96+
description: RunOnAction represents on which actoin this job should
97+
be executed action are create/import-only/destroy/detach
98+
type: string
99+
type:
100+
description: type represents type of job
101+
type: string
102+
values:
103+
description: Values represents necassary fields required to exceute
104+
the job
105+
x-kubernetes-preserve-unknown-fields: true
106+
type: object
122107
type: object
123108
status:
124109
description: status holds the information about the state of a cluster
125110
curator resource, managed cluster heealth and cluster health. It is
126111
consistent with status information across the Kubernetes ecosystem.
127112
properties:
128-
clusterhealth:
129-
description: ClusterStatus represents state of cluster created using
130-
hive
131-
type: object
132113
conditions:
133114
description: conditions describe the state of cluster curator resource
134115
items:
135116
description: Conditions contains details for one aspect of the current
136117
state of this API Resource.
137118
properties:
138-
conditions:
119+
condition:
139120
description: conditions describe the state of job resource
140121
properties:
141122
lastTransitionTime:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/go-logr/logr v0.2.1
77
github.com/onsi/ginkgo v1.12.1
88
github.com/onsi/gomega v1.10.1
9-
k8s.io/apiextensions-apiserver v0.19.0 // indirect
9+
k8s.io/apiextensions-apiserver v0.19.0
1010
k8s.io/apimachinery v0.19.0
1111
k8s.io/client-go v0.19.0
1212
sigs.k8s.io/controller-runtime v0.6.2

0 commit comments

Comments
 (0)