Skip to content

Commit ec9313d

Browse files
author
arbelnat
committed
added enable field to CR and uncomment call home
1 parent d2bdd73 commit ec9313d

File tree

6 files changed

+51
-16
lines changed

6 files changed

+51
-16
lines changed

api/v1/ibmblockcsi_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ type IBMBlockCSICallHomeSpec struct {
120120
Repository string `json:"repository"`
121121
Tag string `json:"tag"`
122122

123+
// +kubebuilder:validation:Optional
124+
Enable bool `json:"enable"`
125+
123126
// +kubebuilder:validation:Optional
124127
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy"`
125128

config/crd/bases/csi.ibm.com_ibmblockcsis.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,8 @@ spec:
502502
type: array
503503
type: object
504504
type: object
505+
enable:
506+
type: boolean
505507
imagePullPolicy:
506508
description: PullPolicy describes a policy for if/when to pull a container image
507509
type: string

config/samples/csi.ibm.com_v1_ibmblockcsi_cr.yaml

+16-15
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,22 @@ spec:
4646
- ppc64le
4747

4848
# callHome is a cronJob
49-
# callHome:
50-
# repository: ibmcom/ibm-block-csi-call-home
51-
# tag: "1.9.0"
52-
# imagePullPolicy: IfNotPresent
53-
# affinity:
54-
# nodeAffinity:
55-
# requiredDuringSchedulingIgnoredDuringExecution:
56-
# nodeSelectorTerms:
57-
# - matchExpressions:
58-
# - key: kubernetes.io/arch
59-
# operator: In
60-
# values:
61-
# - amd64
62-
# - s390x
63-
# - ppc64le
49+
callHome:
50+
repository: ibmcom/ibm-block-csi-call-home
51+
tag: "1.9.0"
52+
enable: false
53+
imagePullPolicy: IfNotPresent
54+
affinity:
55+
nodeAffinity:
56+
requiredDuringSchedulingIgnoredDuringExecution:
57+
nodeSelectorTerms:
58+
- matchExpressions:
59+
- key: kubernetes.io/arch
60+
operator: In
61+
values:
62+
- amd64
63+
- s390x
64+
- ppc64le
6465

6566
# tolerations:
6667
# - effect: NoSchedule

controllers/ibmblockcsi_controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ func (r *IBMBlockCSIReconciler) isNodeReady(node *appsv1.DaemonSet) bool {
589589
}
590590

591591
func (r *IBMBlockCSIReconciler) isCallHomeDefined(instance *ibmblockcsi.IBMBlockCSI) bool {
592-
return instance.Spec.CallHome.Repository != ""
592+
return instance.Spec.CallHome.Enable == true
593593
}
594594

595595
func (r *IBMBlockCSIReconciler) deleteCallHome(instance *ibmblockcsi.IBMBlockCSI, callHome *batchv1.CronJob, logger logr.Logger) error {

deploy/installer/generated/ibm-block-csi-operator.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,8 @@ spec:
502502
type: array
503503
type: object
504504
type: object
505+
enable:
506+
type: boolean
505507
imagePullPolicy:
506508
description: PullPolicy describes a policy for if/when to pull a container image
507509
type: string

deploy/olm-catalog/ibm-block-csi-operator-community/1.9.0/manifests/ibm-block-csi-operator.v1.9.0.clusterserviceversion.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,33 @@ metadata:
7777
}
7878
}
7979
},
80+
"callHome": {
81+
"repository": "ibmcom/ibm-block-csi-call-home",
82+
"tag": "1.9.0",
83+
"enable": false
84+
"imagePullPolicy": "IfNotPresent",
85+
"affinity": {
86+
"nodeAffinity": {
87+
"requiredDuringSchedulingIgnoredDuringExecution": {
88+
"nodeSelectorTerms": [
89+
{
90+
"matchExpressions": [
91+
{
92+
"key": "kubernetes.io/arch",
93+
"operator": "In",
94+
"values": [
95+
"amd64",
96+
"s390x",
97+
"ppc64le"
98+
]
99+
}
100+
]
101+
}
102+
]
103+
}
104+
}
105+
}
106+
},
80107
"sidecars": [
81108
{
82109
"name": "csi-node-driver-registrar",

0 commit comments

Comments
 (0)