Skip to content

Commit

Permalink
reconcile refactor (#10)
Browse files Browse the repository at this point in the history
* update reconcile to use workque , predicate
add watch on daemonset
refactor to use apply for daemonset
test apply change on cr for daemonset
remove kubernetes module in go.mod

* Complete auth support (#8)

* Adding Unit teste

* resolve golinbt issues

* fix merge conflicts

* update authorization helper to use apply for daemonset

* fix auth test type errors

* actions need container built with golang:1.17

* set go.mod controller-runtime to 0.10.3 , 0.11.0 fails to build with actions image-scanner

* remove comments on calls where type changed

Co-authored-by: Michael Edegware <[email protected]>
  • Loading branch information
ChristianAtDell and Michael Edegware committed Oct 15, 2024
1 parent 70519e3 commit c43084b
Show file tree
Hide file tree
Showing 21 changed files with 937 additions and 1,037 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Checkout the code
uses: actions/checkout@v2
- name: Run the formatter, linter, and vetter
uses: dell/common-github-actions/go-code-formatter-linter-vetter@main
uses: dell/common-github-actions/go-code-formatter-linter-vetter@update-go-version
with:
directories: ./...
sanitize:
Expand Down Expand Up @@ -82,4 +82,4 @@ jobs:
uses: Azure/container-scan@v0
with:
image-name: controller:latest
severity-threshold: HIGH
severity-threshold: HIGH
8 changes: 0 additions & 8 deletions api/v1/csm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,9 @@ type ContainerStorageModuleStatus struct {
// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="NodeStatus",xDescriptors="urn:alm:descriptor:com.tectonic.ui:podStatuses"
NodeStatus PodStatus `json:"nodeStatus,omitempty"`

// ContainerStorageModuleHash is a hash of the driver specification
// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="ContainerStorageModuleHash",xDescriptors="urn:alm:descriptor:text"
ContainerStorageModuleHash uint64 `json:"csmHash,omitempty" yaml:"csmHash"`

// State is the state of the driver installation
// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="State",xDescriptors="urn:alm:descriptor:text"
State CSMStateType `json:"state,omitempty" yaml:"state"`

// LastUpdate is the last updated state of the driver
// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="LastUpdate"
LastUpdate LastUpdate `json:"lastUpdate,omitempty" yaml:"lastUpdate"`
}

//+kubebuilder:object:root=true
Expand Down
14 changes: 0 additions & 14 deletions api/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ package v1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// CSMStateType - type representing the state of the ContainerStorageModule (in status)
Expand Down Expand Up @@ -123,19 +122,6 @@ type PodStatus struct {
Stopped []string `json:"stopped,omitempty"`
}

// LastUpdate - Stores the last update condition for the ContainerStorageModule status
type LastUpdate struct {

// Condition is the last known condition of the Custom Resource
Condition CSMOperatorConditionType `json:"condition,omitempty"`

// Time is the time stamp for the last condition update
Time metav1.Time `json:"time,omitempty" yaml:"time"`

// ErrorMessage is the last error message associated with the condition
ErrorMessage string `json:"errorMessage,omitempty" yaml:"errorMessage"`
}

// Driver of CSIDriver
// +k8s:openapi-gen=true
type Driver struct {
Expand Down
17 changes: 0 additions & 17 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

142 changes: 68 additions & 74 deletions config/crd/bases/storage.dell.com_containerstoragemodules.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: 10.247.142.143:5000/csm-operator
newTag: v0.0.1
newName: controller
newTag: latest
8 changes: 8 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ rules:
- list
- update
- watch
- apiGroups:
- csi.storage.k8s.io
resources:
- csinodeinfos
verbs:
- get
- list
- watch
- apiGroups:
- monitoring.coreos.com
resources:
Expand Down
4 changes: 2 additions & 2 deletions config/samples/storage_v1_csm_powerscale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
spec:
driver:
siDriverType: "powerscale"
k8sVersion: v1.22
k8sVersion: v1.23

# Config version for CSI PowerScale v2.0.0 driver
configVersion: v2.0.0
Expand Down Expand Up @@ -156,4 +156,4 @@ spec:

# insecure: Enable/Disable certificate validation of the csm-authorization server
- name: "INSECURE"
value: true
value: true
Loading

0 comments on commit c43084b

Please sign in to comment.