Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Suleyman Akbas <[email protected]>
  • Loading branch information
suleymanakbas91 committed Jan 17, 2024
1 parent 9297b32 commit 340c5f8
Show file tree
Hide file tree
Showing 245 changed files with 17,480 additions and 8,275 deletions.
48 changes: 46 additions & 2 deletions api/v1alpha1/lvmcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package v1alpha1

import (
conditionsv1 "github.com/openshift/custom-resource-status/conditions/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down Expand Up @@ -153,12 +152,57 @@ type LVMClusterStatus struct {

// Conditions describes the state of the resource.
// +optional
Conditions []conditionsv1.Condition `json:"conditions,omitempty"`
Conditions []Condition `json:"conditions,omitempty"`

// DeviceClassStatuses describes the status of all deviceClasses
DeviceClassStatuses []DeviceClassStatus `json:"deviceClassStatuses,omitempty"`
}

// Condition represents the state of the operator's
// reconciliation functionality.
// +k8s:deepcopy-gen=true
type Condition struct {
Type ConditionType `json:"type" description:"type of condition ie. Available|Progressing|Degraded."`

Status corev1.ConditionStatus `json:"status" description:"status of the condition, one of True, False, Unknown"`

// +optional
Reason string `json:"reason,omitempty" description:"one-word CamelCase reason for the condition's last transition"`

// +optional
Message string `json:"message,omitempty" description:"human-readable message indicating details about last transition"`

// +optional
LastHeartbeatTime metav1.Time `json:"lastHeartbeatTime" description:"last time we got an update on a given condition"`

// +optional
LastTransitionTime metav1.Time `json:"lastTransitionTime" description:"last time the condition transit from one status to another"`
}

// ConditionType is the state of the operator's reconciliation functionality.
type ConditionType string

const (
// ConditionAvailable indicates that the resources maintained by the operator,
// is functional and available in the cluster.
ConditionAvailable ConditionType = "Available"

// ConditionProgressing indicates that the operator is actively making changes to the resources maintained by the
// operator
ConditionProgressing ConditionType = "Progressing"

// ConditionDegraded indicates that the resources maintained by the operator are not functioning completely.
// An example of a degraded state would be if not all pods in a deployment were running.
// It may still be available, but it is degraded
ConditionDegraded ConditionType = "Degraded"

// ConditionUpgradeable indicates whether the resources maintained by the operator are in a state that is safe to upgrade.
// When `False`, the resources maintained by the operator should not be upgraded and the
// message field should contain a human readable description of what the administrator should do to
// allow the operator to successfully update the resources maintained by the operator.
ConditionUpgradeable ConditionType = "Upgradeable"
)

// DeviceClassStatus defines the observed status of the deviceclass across all nodes
type DeviceClassStatus struct {
// Name is the name of the deviceclass
Expand Down
20 changes: 18 additions & 2 deletions api/v1alpha1/zz_generated.deepcopy.go

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

2 changes: 1 addition & 1 deletion controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

snapapi "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1"
snapapi "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1"
secv1client "github.com/openshift/client-go/security/clientset/versioned/typed/security/v1"
lvmv1alpha1 "github.com/openshift/lvm-operator/api/v1alpha1"
topolvmv1 "github.com/topolvm/topolvm/api/v1"
Expand Down
2 changes: 1 addition & 1 deletion controllers/topolvm_snapshotclass.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"fmt"

snapapi "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1"
snapapi "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1"
lvmv1alpha1 "github.com/openshift/lvm-operator/api/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion controllers/vgmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"testing"

snapapi "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1"
snapapi "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1"
lvmv1alpha1 "github.com/openshift/lvm-operator/api/v1alpha1"
"gotest.tools/v3/assert"
appsv1 "k8s.io/api/apps/v1"
Expand Down
19 changes: 9 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,22 @@ require (
github.com/aws/aws-sdk-go v1.44.10
github.com/go-logr/logr v1.2.4
github.com/google/go-cmp v0.5.9
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0
github.com/kubernetes-csi/external-snapshotter/client/v6 v6.3.0
github.com/onsi/ginkgo/v2 v2.9.5
github.com/onsi/gomega v1.27.7
github.com/openshift/api v0.0.0-20230613151523-ba04973d3ed1
github.com/openshift/client-go v0.0.0-20230503144108-75015d2347cb
github.com/openshift/custom-resource-status v1.1.2
github.com/operator-framework/api v0.17.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.16.0
github.com/stretchr/testify v1.8.4
github.com/topolvm/topolvm v0.15.4-0.20221116041433-d58476400ff1
gotest.tools/v3 v3.0.3
k8s.io/api v0.27.4
k8s.io/apimachinery v0.27.4
k8s.io/client-go v0.27.4
k8s.io/api v0.28.0
k8s.io/apimachinery v0.28.0
k8s.io/client-go v0.28.0
k8s.io/component-helpers v0.27.4
k8s.io/utils v0.0.0-20230313181309-38a27ef9d749
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
sigs.k8s.io/controller-runtime v0.15.0
sigs.k8s.io/yaml v1.3.0
)
Expand All @@ -47,7 +46,7 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/uuid v1.3.0 // indirect
Expand Down Expand Up @@ -81,7 +80,7 @@ require (
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/net v0.13.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/term v0.10.0 // indirect
Expand All @@ -99,8 +98,8 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.27.2 // indirect
k8s.io/component-base v0.27.2 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)
Loading

0 comments on commit 340c5f8

Please sign in to comment.