Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge in 1.4.2 fixes - verified #480

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=dell-csm-operator
LABEL operators.operatorframework.io.bundle.channels.v1=stable
LABEL operators.operatorframework.io.bundle.channel.default.v1=stable
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.14.0+git
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.32.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3520,7 +3520,7 @@ spec:
name: Dell Technologies
url: https://github.com/dell/csm-operator
relatedImages:
- image: docker.io/dellemc/dell-csm-operator:v1.4.1
- image: docker.io/dellemc/dell-csm-operator:v1.4.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this 1.4.2?

name: dell-csm-operator
- image: docker.io/dellemc/csi-isilon:v2.9.1
name: csi-isilon
Expand Down Expand Up @@ -3575,5 +3575,5 @@ spec:
- image: docker.io/dellemc/connectivity-cert-persister-k8s:0.7.0
name: cert-persister
skips:
- dell-csm-operator.v1.4.0
version: 1.4.1
- dell-csm-operator.v1.4.0
version: 1.4.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this 1.4.2?

43 changes: 28 additions & 15 deletions controllers/csm_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const (
CSMFinalizerName = "finalizer.dell.emc.com"

// CSMVersion -
CSMVersion = "v1.8.0"
CSMVersion = "v1.10.0"
)

var (
Expand Down Expand Up @@ -369,7 +369,7 @@ func (r *ContainerStorageModuleReconciler) handleDeploymentUpdate(oldObj interfa
return
}

log.Debugw("deployment modified generation", d.Generation, old.Generation)
log.Debugw("deployment modified generation", d.Name, d.Generation, old.Generation)

desired := d.Status.Replicas
available := d.Status.AvailableReplicas
Expand All @@ -378,13 +378,16 @@ func (r *ContainerStorageModuleReconciler) handleDeploymentUpdate(oldObj interfa

// Replicas: 2 desired | 2 updated | 2 total | 2 available | 0 unavailable

log.Infow("deployment", "desired", desired)
log.Infow("deployment", "numberReady", ready)
log.Infow("deployment", "available", available)
log.Infow("deployment", "numberUnavailable", numberUnavailable)
log.Infow("deployment", "deployment name", d.Name, "desired", desired)
log.Infow("deployment", "deployment name", d.Name, "numberReady", ready)
log.Infow("deployment", "deployment name", d.Name, "available", available)
log.Infow("deployment", "deployment name", d.Name, "numberUnavailable", numberUnavailable)

ns := d.Namespace
log.Debugw("deployment", "namespace", ns, "name", name)
ns := d.Spec.Template.Labels[constants.CsmNamespaceLabel]
if ns == "" {
ns = d.Namespace
}
log.Debugw("csm being modified in handledeployment", "namespace", ns, "name", name)
namespacedName := t1.NamespacedName{
Name: name,
Namespace: ns,
Expand Down Expand Up @@ -418,7 +421,11 @@ func (r *ContainerStorageModuleReconciler) handlePodsUpdate(_ interface{}, obj i

p, _ := obj.(*corev1.Pod)
name := p.GetLabels()[constants.CsmLabel]
ns := p.Namespace
// if this pod is an obs. pod, namespace might not match csm namespace
ns := p.GetLabels()[constants.CsmNamespaceLabel]
if ns == "" {
ns = p.Namespace
}
if name == "" {
return
}
Expand Down Expand Up @@ -481,7 +488,10 @@ func (r *ContainerStorageModuleReconciler) handleDaemonsetUpdate(oldObj interfac
log.Infow("daemonset ", "available", available)
log.Infow("daemonset ", "numberUnavailable", numberUnavailable)

ns := d.Namespace
ns := d.Spec.Template.Labels[constants.CsmNamespaceLabel]
if ns == "" {
ns = d.Namespace
}
r.Log.Debugw("daemonset ", "ns", ns, "name", name)
namespacedName := t1.NamespacedName{
Name: name,
Expand Down Expand Up @@ -671,7 +681,8 @@ func (r *ContainerStorageModuleReconciler) SyncCSM(ctx context.Context, cr csmv1
log := logger.GetLogger(ctx)

// Create/Update Authorization Proxy Server
if authorizationEnabled, _ := utils.IsModuleEnabled(ctx, cr, csmv1.AuthorizationServer); authorizationEnabled {
authorizationEnabled, _ := utils.IsModuleEnabled(ctx, cr, csmv1.AuthorizationServer)
if authorizationEnabled {
log.Infow("Create/Update authorization")
if err := r.reconcileAuthorization(ctx, false, operatorConfig, cr, ctrlClient); err != nil {
return fmt.Errorf("failed to deploy authorization proxy server: %v", err)
Expand Down Expand Up @@ -834,9 +845,11 @@ func (r *ContainerStorageModuleReconciler) SyncCSM(ctx context.Context, cr csmv1
return err
}

// Create/Update DeamonSet
if err = daemonset.SyncDaemonset(ctx, node.DaemonSetApplyConfig, cluster.ClusterK8sClient, cr.Name); err != nil {
return err
// Create/Update DeamonSet, except for auth proxy
if !authorizationEnabled {
if err = daemonset.SyncDaemonset(ctx, node.DaemonSetApplyConfig, cluster.ClusterK8sClient, cr.Name); err != nil {
return err
}
}

if replicationEnabled {
Expand Down Expand Up @@ -1187,7 +1200,7 @@ func (r *ContainerStorageModuleReconciler) removeDriver(ctx context.Context, ins
return nil
}

// removeModule - remove authorization proxy server
// removeModule - remove standalone modules
func (r *ContainerStorageModuleReconciler) removeModule(ctx context.Context, instance csmv1.ContainerStorageModule, operatorConfig utils.OperatorConfig, ctrlClient client.Client) error {
log := logger.GetLogger(ctx)

Expand Down
5 changes: 0 additions & 5 deletions operatorconfig/driverconfig/powerflex/v2.8.0/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,6 @@ spec:
value: <X_CSI_RENAME_SDC_PREFIX>
- name: X_CSI_MAX_VOLUMES_PER_NODE
value: <X_CSI_MAX_VOLUMES_PER_NODE>
- name: X_CSI_POWERFLEX_KUBE_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
volumeMounts:
- name: driver-path
mountPath: <KUBELET_CONFIG_DIR>/plugins/vxflexos.emc.dell.com
Expand Down
5 changes: 0 additions & 5 deletions operatorconfig/driverconfig/powerflex/v2.9.0/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,6 @@ spec:
value: <X_CSI_RENAME_SDC_PREFIX>
- name: X_CSI_MAX_VOLUMES_PER_NODE
value: <X_CSI_MAX_VOLUMES_PER_NODE>
- name: X_CSI_POWERFLEX_KUBE_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
volumeMounts:
- name: driver-path
mountPath: <KUBELET_CONFIG_DIR>/plugins/vxflexos.emc.dell.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spec:
template:
metadata:
labels:
csm: <NAME>
app: proxy-server
spec:
containers:
Expand Down Expand Up @@ -92,6 +93,7 @@ spec:
template:
metadata:
labels:
csm: <NAME>
app: tenant-service
spec:
containers:
Expand Down Expand Up @@ -176,6 +178,7 @@ spec:
template:
metadata:
labels:
csm: <NAME>
app: role-service
spec:
serviceAccountName: role-service
Expand Down Expand Up @@ -254,6 +257,7 @@ spec:
template:
metadata:
labels:
csm: <NAME>
app: storage-service
spec:
serviceAccountName: storage-service
Expand Down Expand Up @@ -316,6 +320,7 @@ spec:
template:
metadata:
labels:
csm: <NAME>
app: redis
role: primary
tier: backend
Expand Down Expand Up @@ -367,6 +372,7 @@ spec:
template:
metadata:
labels:
csm: <NAME>
app: redis-commander
tier: backend
spec:
Expand Down Expand Up @@ -496,4 +502,4 @@ roleRef:
subjects:
- kind: Group
name: system:serviceaccounts:authorization
apiGroup: rbac.authorization.k8s.io
apiGroup: rbac.authorization.k8s.io
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ spec:
template:
metadata:
labels:
csm: <NAME>
app.kubernetes.io/component: controller
app.kubernetes.io/instance: <NAMESPACE>
app.kubernetes.io/name: ingress-nginx
Expand Down Expand Up @@ -660,4 +661,4 @@ webhooks:
resources:
- ingresses
sideEffects: None


Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ spec:
metadata:
labels:
app: proxy-server
csm: <NAME>
spec:
containers:
- name: proxy-server
Expand Down Expand Up @@ -93,6 +94,7 @@ spec:
metadata:
labels:
app: tenant-service
csm: <NAME>
spec:
containers:
- name: tenant-service
Expand Down Expand Up @@ -176,6 +178,7 @@ spec:
template:
metadata:
labels:
csm: <NAME>
app: role-service
spec:
serviceAccountName: role-service
Expand Down Expand Up @@ -254,6 +257,7 @@ spec:
template:
metadata:
labels:
csm: <NAME>
app: storage-service
spec:
serviceAccountName: storage-service
Expand Down Expand Up @@ -316,6 +320,7 @@ spec:
template:
metadata:
labels:
csm: <NAME>
app: redis
role: primary
tier: backend
Expand Down Expand Up @@ -367,6 +372,7 @@ spec:
template:
metadata:
labels:
csm: <NAME>
app: redis-commander
tier: backend
spec:
Expand Down Expand Up @@ -496,4 +502,4 @@ roleRef:
subjects:
- kind: Group
name: system:serviceaccounts:authorization
apiGroup: rbac.authorization.k8s.io
apiGroup: rbac.authorization.k8s.io
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ spec:
template:
metadata:
labels:
csm: <NAME>
app.kubernetes.io/component: controller
app.kubernetes.io/instance: <NAMESPACE>
app.kubernetes.io/name: ingress-nginx
Expand Down Expand Up @@ -660,4 +661,4 @@ webhooks:
resources:
- ingresses
sideEffects: None


Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ spec:
metadata:
labels:
app: proxy-server
csm: <NAME>
spec:
containers:
- name: proxy-server
Expand Down Expand Up @@ -93,6 +94,7 @@ spec:
metadata:
labels:
app: tenant-service
csm: <NAME>
spec:
containers:
- name: tenant-service
Expand Down Expand Up @@ -176,6 +178,7 @@ spec:
template:
metadata:
labels:
csm: <NAME>
app: role-service
spec:
serviceAccountName: role-service
Expand Down Expand Up @@ -255,6 +258,7 @@ spec:
metadata:
labels:
app: storage-service
csm: <NAME>
spec:
serviceAccountName: storage-service
containers:
Expand Down Expand Up @@ -319,6 +323,7 @@ spec:
app: redis
role: primary
tier: backend
csm: <NAME>
spec:
containers:
- name: primary
Expand Down Expand Up @@ -369,6 +374,7 @@ spec:
labels:
app: redis-commander
tier: backend
csm: <NAME>
spec:
containers:
- name: redis-commander
Expand Down Expand Up @@ -496,4 +502,4 @@ roleRef:
subjects:
- kind: Group
name: system:serviceaccounts:authorization
apiGroup: rbac.authorization.k8s.io
apiGroup: rbac.authorization.k8s.io
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ spec:
app.kubernetes.io/component: controller
app.kubernetes.io/instance: <NAMESPACE>
app.kubernetes.io/name: ingress-nginx
csm: <NAME>
spec:
containers:
- args:
Expand Down Expand Up @@ -660,4 +661,4 @@ webhooks:
resources:
- ingresses
sideEffects: None


Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ spec:
app.kubernetes.io/name: karavi-metrics-powerflex
app.kubernetes.io/instance: karavi
csm: <NAME>
csmNamespace: <CSM_NAMESPACE>
spec:
serviceAccount: karavi-metrics-powerflex-controller
containers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ spec:
app.kubernetes.io/name: karavi-metrics-powermax
app.kubernetes.io/instance: karavi
csm: <NAME>
csmNamespace: <CSM_NAMESPACE>
spec:
serviceAccountName: karavi-metrics-powermax-controller
containers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ spec:
app.kubernetes.io/name: karavi-metrics-powerscale
app.kubernetes.io/instance: karavi
csm: <NAME>
csmNamespace: <CSM_NAMESPACE>
spec:
serviceAccount: karavi-metrics-powerscale-controller
containers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ spec:
app.kubernetes.io/name: otel-collector
app.kubernetes.io/instance: karavi-observability
csm: <NAME>
csmNamespace: <CSM_NAMESPACE>
spec:
volumes:
- name: tls-secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ spec:
app.kubernetes.io/name: karavi-topology
app.kubernetes.io/instance: karavi-observability
csm: <NAME>
csmNamespace: <CSM_NAMESPACE>
spec:
volumes:
- name: karavi-topology-secret-volume
Expand Down
Loading
Loading