Skip to content

Commit

Permalink
Merge in 1.4.2 fixes - verified (#483)
Browse files Browse the repository at this point in the history
* Test branch (#482)

* Verified merge fixed release v1.4.2 (#479)

* Add permissions for SC removal. (#431)

* Bump_up_csm-operator_version_to_1.4.1 (#434)

* Patch version support (#433)

* Adding support of v2.9.1 for Pmax, Pscale, PFlex and unity

* Updating module config version for Pmax, Pscale, PFlex and unity

* Update storage_csm_powerflex.yaml

* version changed to 2.9.1

* version changed to 2.9.1

* Enabling github actions for all branch

* updated version to 2.9.1 for unity, powerflex, powerscale and powermax

* Adding the support of PStore v2.9.1

* Adding the support of PFlex v2.9.1

* Version bumpup replication 1.7.1

* Bump up version for authorization, resiliency

* update csi-metadata-retriever version to 1.6.1

* update reverseproxy version to 2.8.1

---------

Co-authored-by: KshitijaKakde <[email protected]>
Co-authored-by: Kshitija Kakde <[email protected]>
Co-authored-by: HarishH-DELL <[email protected]>
Co-authored-by: panigs7 <[email protected]>

* Change namespace name to match documentation. (#437)

* go-yaml version update (#438)

* go-yaml version update

* update go-yaml package to latest

* remove extra verbs

* remove duplicate verbs and add correct test files for resiliency UT

---------

Co-authored-by: Shayna Finocchiaro <[email protected]>

* [bug-1120]: Update Authorization sidecar to use insecure flag (#442)

* fix auth cert

* remove constant

* remove duplicate verbs

* reverting #426 changes (#444)

* Update final manifests for posting of Operator 1.4.1 (#445)

* KRV-20573/csm status (#446)

* add module status

* Adding CSM Module status

* Addressing the comments for PR

* Making code reusable

* Fix formatting issue

* Resolving gosec issue

* Final manifest update and apex client (#447)

* Add csm watch permissions. (#448)

* Merged CSM Module Status

* Fix App-Mob node error (#457)

Co-authored-by: abhi16394 <[email protected]>

* Bump up CSM Operator version to 1.4.2 (#458)

* update csm operator version to 1.4.2

* bump-up-op-version-1.4.2

* updated version in operator.yaml

* adding missing arg to fix e2e

* update authorization e2e (#459)

* skip cert validation in e2e (#460)

* Fixing FSGroupPolicy issue (#463)

* Fixing FSGroupPolicy issue

* Add unit test

---------

Co-authored-by: Akshay Saini <[email protected]>

* Fix for controller race, daemon status, and obs namespace  (#464)

* test controller state calc

* add debug logs

* check for driver

* add daemonnset update

* adds ns fix for when pod ns dis not csm ns

* add ns check for daemon and deployment as well

* fix typo

* fix typo

* explicitly return nil

* add missing replace statements

---------

Co-authored-by: grosnj1 <[email protected]>

* Auth proxy status fix (#465)

* actions

* working on auth proxy status check

* finished status check

* fix 1

* fix or

* code compiles

* keep auth proxy out of daemonset check

* trying to figure out deployment name

* formatting

* fix auth name in if condition

* no daemonset

* fix

* added log statements

* added another log statement

* fix log statement

* logs logs logs

* compile

* more logs

* add logs and try updating status from handlesuccess

* remove UpdateStatus call for now

* adding csm label to auth

* remove extraneous string replacement

* removing commented code

* Update actions.yml

* fix merge issue

* fix fmt

* fix pscale + obs issue  (#467)

* fix some issues

* fiix label issue, add debug logs

* add more debug

* more  debugg lines

* fix pscale issue

* remmove debug logs

* gofmt

* set available to 0 en deployment is not checked

* fix if check

---------

Co-authored-by: grosnj1 <[email protected]>

* update final manifests (#468)

* fix vetting issues (#477)

Co-authored-by: grosnj1 <[email protected]>

---------

Co-authored-by: Don Khan <[email protected]>
Co-authored-by: HarishH-DELL <[email protected]>
Co-authored-by: Adarsh Kumar Yadav <[email protected]>
Co-authored-by: KshitijaKakde <[email protected]>
Co-authored-by: Kshitija Kakde <[email protected]>
Co-authored-by: HarishH-DELL <[email protected]>
Co-authored-by: panigs7 <[email protected]>
Co-authored-by: Shayna Finocchiaro <[email protected]>
Co-authored-by: Aaron Tye <[email protected]>
Co-authored-by: Rishabh Raj <[email protected]>
Co-authored-by: panigs7 <[email protected]>
Co-authored-by: abhi16394 <[email protected]>
Co-authored-by: Chiman Jain <[email protected]>
Co-authored-by: Jooseppi Luna <[email protected]>
Co-authored-by: abhi16394 <[email protected]>
Co-authored-by: Akshay Saini <[email protected]>
Co-authored-by: grosnj1 <[email protected]>

* PR feedback

---------

Co-authored-by: Don Khan <[email protected]>
Co-authored-by: HarishH-DELL <[email protected]>
Co-authored-by: Adarsh Kumar Yadav <[email protected]>
Co-authored-by: KshitijaKakde <[email protected]>
Co-authored-by: Kshitija Kakde <[email protected]>
Co-authored-by: HarishH-DELL <[email protected]>
Co-authored-by: panigs7 <[email protected]>
Co-authored-by: Shayna Finocchiaro <[email protected]>
Co-authored-by: Aaron Tye <[email protected]>
Co-authored-by: Rishabh Raj <[email protected]>
Co-authored-by: panigs7 <[email protected]>
Co-authored-by: abhi16394 <[email protected]>
Co-authored-by: Chiman Jain <[email protected]>
Co-authored-by: Jooseppi Luna <[email protected]>
Co-authored-by: abhi16394 <[email protected]>
Co-authored-by: Akshay Saini <[email protected]>
Co-authored-by: grosnj1 <[email protected]>

* add KUBE_NODE_NAME back in

* add KUBE_NODE_NAME back in

* add KUBE_NODE_NAME back into tests

* Update dell-csm-operator.clusterserviceversion.yaml

---------

Co-authored-by: Don Khan <[email protected]>
Co-authored-by: HarishH-DELL <[email protected]>
Co-authored-by: Adarsh Kumar Yadav <[email protected]>
Co-authored-by: KshitijaKakde <[email protected]>
Co-authored-by: Kshitija Kakde <[email protected]>
Co-authored-by: HarishH-DELL <[email protected]>
Co-authored-by: panigs7 <[email protected]>
Co-authored-by: Shayna Finocchiaro <[email protected]>
Co-authored-by: Aaron Tye <[email protected]>
Co-authored-by: Rishabh Raj <[email protected]>
Co-authored-by: panigs7 <[email protected]>
Co-authored-by: abhi16394 <[email protected]>
Co-authored-by: Chiman Jain <[email protected]>
Co-authored-by: Jooseppi Luna <[email protected]>
Co-authored-by: abhi16394 <[email protected]>
Co-authored-by: Akshay Saini <[email protected]>
Co-authored-by: grosnj1 <[email protected]>
  • Loading branch information
18 people authored Feb 20, 2024
1 parent da0b35b commit 2902cb3
Show file tree
Hide file tree
Showing 31 changed files with 311 additions and 58 deletions.
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
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
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
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

0 comments on commit 2902cb3

Please sign in to comment.