Skip to content

Commit

Permalink
Rename sds-lvm to sds-local-volume (#10)
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
  • Loading branch information
AleksZimin authored Mar 1, 2024
1 parent 4386fe2 commit 51e315e
Show file tree
Hide file tree
Showing 72 changed files with 338 additions and 338 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ __pycache__/
.pytest_cache/

# dev
images/sds-lvm-csi/Makefile
images/sds-lvm-scheduler-extender/Makefile
images/sds-lvm-controller/Makefile
images/sds-local-volume-csi/Makefile
images/sds-local-volume-scheduler-extender/Makefile
images/sds-local-volume-controller/Makefile
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name: sds-lvm
name: sds-local-volume
version: 0.0.1
12 changes: 6 additions & 6 deletions crds/lvmstorageclass.yaml → crds/localstorageclass.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: lvmstorageclasses.storage.deckhouse.io
name: localstorageclasses.storage.deckhouse.io
labels:
heritage: deckhouse
module: sds-lvm
module: sds-local-volume
spec:
group: storage.deckhouse.io
scope: Cluster
names:
plural: lvmstorageclasses
singular: lvmstorageclass
kind: LVMStorageClass
plural: localstorageclasses
singular: localstorageclass
kind: LocalStorageClass
shortNames:
- lsc
preserveUnknownFields: false
Expand All @@ -23,7 +23,7 @@ spec:
openAPIV3Schema:
type: object
description: |
LVMStorageClass is a Kubernetes Custom Resource that defines a configuration for a Kubernetes Storage class.
LocalStorageClass is a Kubernetes Custom Resource that defines a configuration for a Kubernetes Storage class.
required:
- spec
properties:
Expand Down
4 changes: 2 additions & 2 deletions hooks/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import unittest


NAMESPACE = "d8-sds-lvm"
MODULE_NAME = "sdsLvm"
NAMESPACE = "d8-sds-local-volume"
MODULE_NAME = "sdsLocalVolume"

def json_load(path: str):
with open(path, "r", encoding="utf-8") as f:
Expand Down
2 changes: 1 addition & 1 deletion hooks/generate_webhook_certs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def main():
f"webhooks.{common.NAMESPACE}.svc"]),
values_path_prefix=f"{common.MODULE_NAME}.internal.customWebhookCert"
),
cn="sds-lvm-webhooks",
cn="sds-local-volume-webhooks",
common_ca=True,
namespace=common.NAMESPACE)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ ADD go.sum .
RUN go mod download
COPY . .
WORKDIR /go/src/cmd
RUN GOOS=linux GOARCH=amd64 go build -o sds-lvm-controller
RUN GOOS=linux GOARCH=amd64 go build -o sds-local-volume-controller

FROM --platform=linux/amd64 $BASE_ALPINE
COPY --from=builder /go/src/cmd/sds-lvm-controller /go/src/cmd/sds-lvm-controller
COPY --from=builder /go/src/cmd/sds-local-volume-controller /go/src/cmd/sds-local-volume-controller

ENTRYPOINT ["/go/src/cmd/sds-lvm-controller"]
ENTRYPOINT ["/go/src/cmd/sds-local-volume-controller"]
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,38 @@ package v1alpha1

import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

type LVMStorageClass struct {
type LocalStorageClass struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec LVMStorageClassSpec `json:"spec"`
Status *LVMStorageClassStatus `json:"status,omitempty"`
Spec LocalStorageClassSpec `json:"spec"`
Status *LocalStorageClassStatus `json:"status,omitempty"`
}

// LVMStorageClassList contains a list of empty block device
type LVMStorageClassList struct {
// LocalStorageClassList contains a list of empty block device
type LocalStorageClassList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []LVMStorageClass `json:"items"`
Items []LocalStorageClass `json:"items"`
}

type LVMStorageClassSpec struct {
IsDefault bool `json:"isDefault"`
Type string `json:"type"`
ReclaimPolicy string `json:"reclaimPolicy"`
VolumeBindingMode string `json:"volumeBindingMode"`
LVMVolumeGroups []LVMStorageClassLVG `json:"lvmVolumeGroups"`
type LocalStorageClassSpec struct {
IsDefault bool `json:"isDefault"`
Type string `json:"type"`
ReclaimPolicy string `json:"reclaimPolicy"`
VolumeBindingMode string `json:"volumeBindingMode"`
LVMVolumeGroups []LocalStorageClassLVG `json:"lvmVolumeGroups"`
}

type LVMStorageClassStatus struct {
type LocalStorageClassStatus struct {
Phase string `json:"phase,omitempty"`
Reason string `json:"reason,omitempty"`
}

type LVMStorageClassLVG struct {
Name string `json:"name"`
Thin *LVMStorageClassThinPool `json:"thin,omitempty"`
type LocalStorageClassLVG struct {
Name string `json:"name"`
Thin *LocalStorageClassThinPool `json:"thin,omitempty"`
}

type LVMStorageClassThinPool struct {
type LocalStorageClassThinPool struct {
PoolName string `json:"poolName"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
)

const (
LVMStorageClassKind = "LVMStorageClass"
APIGroup = "storage.deckhouse.io"
APIVersion = "v1alpha1"
LocalStorageClassKind = "LocalStorageClass"
APIGroup = "storage.deckhouse.io"
APIVersion = "v1alpha1"
)

// SchemeGroupVersion is group version used to register these objects
Expand All @@ -41,8 +41,8 @@ var (
// Adds the list of known types to Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&LVMStorageClass{},
&LVMStorageClassList{},
&LocalStorageClass{},
&LocalStorageClassList{},
&LvmVolumeGroup{},
&LvmVolumeGroupList{},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,57 +19,57 @@ package v1alpha1
import "k8s.io/apimachinery/pkg/runtime"

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LVMStorageClass) DeepCopyInto(out *LVMStorageClass) {
func (in *LocalStorageClass) DeepCopyInto(out *LocalStorageClass) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)

}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmptyBlockDevice.
func (in *LVMStorageClass) DeepCopy() *LVMStorageClass {
func (in *LocalStorageClass) DeepCopy() *LocalStorageClass {
if in == nil {
return nil
}
out := new(LVMStorageClass)
out := new(LocalStorageClass)
in.DeepCopyInto(out)
return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *LVMStorageClass) DeepCopyObject() runtime.Object {
func (in *LocalStorageClass) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LVMStorageClassList) DeepCopyInto(out *LVMStorageClassList) {
func (in *LocalStorageClassList) DeepCopyInto(out *LocalStorageClassList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]LVMStorageClass, len(*in))
*out = make([]LocalStorageClass, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GuestbookList.
func (in *LVMStorageClassList) DeepCopy() *LVMStorageClassList {
func (in *LocalStorageClassList) DeepCopy() *LocalStorageClassList {
if in == nil {
return nil
}
out := new(LVMStorageClassList)
out := new(LocalStorageClassList)
in.DeepCopyInto(out)
return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *LVMStorageClassList) DeepCopyObject() runtime.Object {
func (in *LocalStorageClassList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import (
"fmt"
"os"
goruntime "runtime"
"sds-lvm-controller/api/v1alpha1"
"sds-lvm-controller/pkg/config"
"sds-lvm-controller/pkg/controller"
"sds-lvm-controller/pkg/kubutils"
"sds-lvm-controller/pkg/logger"
"sds-lvm-controller/pkg/monitoring"
"sds-local-volume-controller/api/v1alpha1"
"sds-local-volume-controller/pkg/config"
"sds-local-volume-controller/pkg/controller"
"sds-local-volume-controller/pkg/kubutils"
"sds-local-volume-controller/pkg/logger"
"sds-local-volume-controller/pkg/monitoring"

v1 "k8s.io/api/core/v1"
sv1 "k8s.io/api/storage/v1"
Expand Down Expand Up @@ -98,7 +98,7 @@ func main() {

metrics := monitoring.GetMetrics("")

if _, err = controller.RunLVMStorageClassWatcherController(mgr, *cfgParams, *log, metrics); err != nil {
if _, err = controller.RunLocalStorageClassWatcherController(mgr, *cfgParams, *log, metrics); err != nil {
log.Error(err, "[main] unable to controller.RunBlockDeviceController")
os.Exit(1)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module sds-lvm-controller
module sds-local-volume-controller

go 1.21

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package config

import (
"os"
"sds-lvm-controller/pkg/logger"
"sds-local-volume-controller/pkg/logger"
"time"
)

Expand Down
Loading

0 comments on commit 51e315e

Please sign in to comment.