Skip to content

Commit d45f17f

Browse files
authored
RH certify (#229)
* Add bundle * update mode * Doesn't create default config and registry instance * fix power make file * format code * adjust cr order * Don't use env parameters to control default cr creating * Add bundle * update mode * Doesn't create default config and registry instance * fix power make file * format code * adjust cr order * Don't use env parameters to control default cr creating * fix lint * fix lint * Add bundle * update mode * Doesn't create default config and registry instance * fix power make file * format code * adjust cr order * Don't use env parameters to control default cr creating * fix lint * update mode * Doesn't create default config and registry instance * fix power make file * format code * Don't use env parameters to control default cr creating * fix lint * Add all the resources * add Namespace and Deployment * add resources to odlm * update create bundle * adjust order
1 parent bcdc188 commit d45f17f

File tree

5 files changed

+212
-52
lines changed

5 files changed

+212
-52
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ build/_test
99
build/_generate
1010
.vscode
1111
env
12+
bundle
1213
# Test binary, built with `go test -c`
1314
*.test
1415

common/Makefile.common.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,7 @@ code-gen:
7373
@echo Updating/Generating a ClusterServiceVersion YAML manifest for the operator
7474
operator-sdk generate csv --csv-version ${CSV_VERSION} --update-crds
7575

76+
bundle:
77+
@common/scripts/create_bundle.sh ${CSV_VERSION}
7678

77-
.PHONY: code-vet code-fmt code-tidy code-gen csv-gen lint-copyright-banner lint-go lint-all config-docker install-operator-sdk
79+
.PHONY: code-vet code-fmt code-tidy code-gen csv-gen lint-copyright-banner lint-go lint-all config-docker install-operator-sdk bundle

common/scripts/create_bundle.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2020 IBM Corporation
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http:#www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# create zip file containing the bundle to submit for Red Hat certification
18+
# the bundle consists of package.yaml, clusterserviceversion.yaml, crd.yaml
19+
# run as 'scripts/create-bundle.sh'
20+
21+
if [ -d "./bundle" ]
22+
then
23+
echo "cleanup bundle directory"
24+
rm bundle/*.yaml
25+
rm bundle/*.zip
26+
else
27+
echo "create bundle directory"
28+
mkdir bundle
29+
fi
30+
31+
cp -p deploy/olm-catalog/operand-deployment-lifecycle-manager/operand-deployment-lifecycle-manager.package.yaml bundle/
32+
cp -p deploy/olm-catalog/operand-deployment-lifecycle-manager/"$1"/*.yaml bundle/
33+
34+
cd bundle || exit
35+
zip operand-deployment-lifecycle-manager ./*.yaml

deploy/olm-catalog/operand-deployment-lifecycle-manager/1.1.0/operand-deployment-lifecycle-manager.v1.1.0.clusterserviceversion.yaml

Lines changed: 173 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,56 @@ kind: ClusterServiceVersion
33
metadata:
44
annotations:
55
alm-examples: |-
6-
[
6+
[
7+
{
8+
"apiVersion": "operator.ibm.com/v1alpha1",
9+
"kind": "OperandRequest",
10+
"metadata": {
11+
"name": "common-service"
12+
},
13+
"spec": {
14+
"requests": [
15+
{
16+
"operands": [
17+
{
18+
"name": "ibm-cert-manager-operator"
19+
},
20+
{
21+
"name": "ibm-mongodb-operator"
22+
},
23+
{
24+
"name": "ibm-iam-operator"
25+
},
26+
{
27+
"name": "ibm-monitoring-exporters-operator"
28+
},
29+
{
30+
"name": "ibm-monitoring-prometheusext-operator"
31+
},
32+
{
33+
"name": "ibm-monitoring-grafana-operator"
34+
},
35+
{
36+
"name": "ibm-healthcheck-operator"
37+
},
38+
{
39+
"name": "ibm-management-ingress-operator"
40+
},
41+
{
42+
"name": "ibm-licensing-operator"
43+
},
44+
{
45+
"name": "ibm-metering-operator"
46+
},
47+
{
48+
"name": "ibm-commonui-operator"
49+
}
50+
],
51+
"registry": "common-service"
52+
}
53+
]
54+
}
55+
},
756
{
857
"apiVersion": "operator.ibm.com/v1alpha1",
958
"kind": "OperandConfig",
@@ -309,55 +358,6 @@ metadata:
309358
}
310359
]
311360
}
312-
},
313-
{
314-
"apiVersion": "operator.ibm.com/v1alpha1",
315-
"kind": "OperandRequest",
316-
"metadata": {
317-
"name": "common-service"
318-
},
319-
"spec": {
320-
"requests": [
321-
{
322-
"operands": [
323-
{
324-
"name": "ibm-cert-manager-operator"
325-
},
326-
{
327-
"name": "ibm-mongodb-operator"
328-
},
329-
{
330-
"name": "ibm-iam-operator"
331-
},
332-
{
333-
"name": "ibm-monitoring-exporters-operator"
334-
},
335-
{
336-
"name": "ibm-monitoring-prometheusext-operator"
337-
},
338-
{
339-
"name": "ibm-monitoring-grafana-operator"
340-
},
341-
{
342-
"name": "ibm-healthcheck-operator"
343-
},
344-
{
345-
"name": "ibm-management-ingress-operator"
346-
},
347-
{
348-
"name": "ibm-licensing-operator"
349-
},
350-
{
351-
"name": "ibm-metering-operator"
352-
},
353-
{
354-
"name": "ibm-commonui-operator"
355-
}
356-
],
357-
"registry": "common-service"
358-
}
359-
]
360-
}
361361
}
362362
]
363363
capabilities: Basic Install
@@ -379,6 +379,46 @@ spec:
379379
displayName: OperandConfig
380380
kind: OperandConfig
381381
name: operandconfigs.operator.ibm.com
382+
resources:
383+
- kind: Deployment
384+
name: ''
385+
version: v1
386+
- kind: Replicaset
387+
name: ''
388+
version: v1
389+
- kind: Pod
390+
name: ''
391+
version: v1
392+
- kind: Service
393+
name: ''
394+
version: v1
395+
- kind: Configmap
396+
name: ''
397+
version: v1
398+
- kind: Installplan
399+
name: ''
400+
version: v1alpha1
401+
- kind: Catalogsource
402+
name: ''
403+
version: v1alpha1
404+
- kind: Clusterserviceversion
405+
name: ''
406+
version: v1alpha1
407+
- kind: Operatorgroup
408+
name: ''
409+
version: v1
410+
- kind: Subscription
411+
name: operators.coreos.com
412+
version: v1alpha1
413+
- kind: Operandconfig
414+
name: ''
415+
version: v1alpha1
416+
- kind: Operandrequest
417+
name: ''
418+
version: v1alpha1
419+
- kind: Operandregistry
420+
name: ''
421+
version: v1alpha1
382422
specDescriptors:
383423
- description: Services is a list of configuration of service
384424
displayName: Services
@@ -394,6 +434,46 @@ spec:
394434
displayName: OperandRegistry
395435
kind: OperandRegistry
396436
name: operandregistries.operator.ibm.com
437+
resources:
438+
- kind: Deployment
439+
name: ''
440+
version: v1
441+
- kind: Replicaset
442+
name: ''
443+
version: v1
444+
- kind: Pod
445+
name: ''
446+
version: v1
447+
- kind: Service
448+
name: ''
449+
version: v1
450+
- kind: Configmap
451+
name: ''
452+
version: v1
453+
- kind: Installplan
454+
name: ''
455+
version: v1alpha1
456+
- kind: Catalogsource
457+
name: ''
458+
version: v1alpha1
459+
- kind: Clusterserviceversion
460+
name: ''
461+
version: v1alpha1
462+
- kind: Operatorgroup
463+
name: ''
464+
version: v1
465+
- kind: Subscription
466+
name: operators.coreos.com
467+
version: v1alpha1
468+
- kind: Operandconfig
469+
name: ''
470+
version: v1alpha1
471+
- kind: Operandrequest
472+
name: ''
473+
version: v1alpha1
474+
- kind: Operandregistry
475+
name: ''
476+
version: v1alpha1
397477
specDescriptors:
398478
- description: Operators is a list of operator OLM definition
399479
displayName: Operators
@@ -409,6 +489,49 @@ spec:
409489
displayName: OperandRequest
410490
kind: OperandRequest
411491
name: operandrequests.operator.ibm.com
492+
resources:
493+
- kind: Namespace
494+
name: ''
495+
version: v1
496+
- kind: Deployment
497+
name: ''
498+
version: v1
499+
- kind: Replicaset
500+
name: ''
501+
version: v1
502+
- kind: Pod
503+
name: ''
504+
version: v1
505+
- kind: Service
506+
name: ''
507+
version: v1
508+
- kind: Configmap
509+
name: ''
510+
version: v1
511+
- kind: Installplan
512+
name: ''
513+
version: v1alpha1
514+
- kind: Catalogsource
515+
name: ''
516+
version: v1alpha1
517+
- kind: Clusterserviceversion
518+
name: ''
519+
version: v1alpha1
520+
- kind: Operatorgroup
521+
name: ''
522+
version: v1
523+
- kind: Subscription
524+
name: operators.coreos.com
525+
version: v1alpha1
526+
- kind: Operandconfig
527+
name: ''
528+
version: v1alpha1
529+
- kind: Operandrequest
530+
name: ''
531+
version: v1alpha1
532+
- kind: Operandregistry
533+
name: ''
534+
version: v1alpha1
412535
specDescriptors:
413536
- description: Requests defines a list of operands installation
414537
displayName: Requests

pkg/apis/operator/v1alpha1/operandregistry_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ type OperandRegistryStatus struct {
8787
// +optional
8888
Phase OperatorPhase `json:"phase,omitempty"`
8989
// OperatorsStatus defines operators status and the number of reconcile request
90-
// +listType=set
9190
// +optional
9291
OperatorsStatus map[string]OperatorStatus `json:"operatorsStatus,omitempty"`
9392
}

0 commit comments

Comments
 (0)