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

OCPEDGE-1126: Rebase LVMS in replacement of topolvm #3535

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b0bc1e8
feat!: replace topolvm with lvms
jakobmoellerdev Jun 14, 2024
658d794
feat!: /var/lib mapping
jakobmoellerdev Jul 1, 2024
8889c5a
update last_lvms_rebase.sh
jakobmoellerdev Jul 4, 2024
b0ebfd4
update LVMS manifests
jakobmoellerdev Jul 4, 2024
29035a6
chore: drop external snapshotter as its managed in lvms
jakobmoellerdev Jul 4, 2024
e53104a
chore: fixup leftovers
jakobmoellerdev Jul 4, 2024
509a91d
chore: fixup leftovers
jakobmoellerdev Jul 4, 2024
e567761
chore: fixup image verification
jakobmoellerdev Jul 4, 2024
00dbb85
chore: rework read handler for unstructured to be error aware
jakobmoellerdev Jul 5, 2024
6877e3e
chore: rework rebase to update entry point and use fallback
jakobmoellerdev Jul 5, 2024
5ffebe6
chore: auto update entry point
jakobmoellerdev Jul 5, 2024
91edbb1
chore: various errwrap fixes
jakobmoellerdev Jul 5, 2024
129fffe
fix: properly cancel goroutine on failure during watch setup
jakobmoellerdev Jul 5, 2024
37cde90
chore: small test log correction
jakobmoellerdev Jul 5, 2024
b9d0b61
chore: correct defer
jakobmoellerdev Jul 5, 2024
527073e
chore: fixup release ver
jakobmoellerdev Jul 5, 2024
653f55e
chore: fixup logs
jakobmoellerdev Jul 5, 2024
11017fd
chore: fixup script
jakobmoellerdev Jul 5, 2024
84caa0d
chore: fixup script
jakobmoellerdev Jul 5, 2024
eafe934
chore: fixup pr
jakobmoellerdev Jul 5, 2024
d1e136a
chore: fixup pr
jakobmoellerdev Jul 5, 2024
d3780db
fix: create cleanup routine
jakobmoellerdev Jul 8, 2024
4ee19df
fix: create cleanup routine
jakobmoellerdev Jul 8, 2024
3b151f3
chore: concurrent cleanup
jakobmoellerdev Jul 8, 2024
def76aa
chore: add upgrade deletion test
jakobmoellerdev Jul 10, 2024
34dd499
Merge branch 'main' into rebase-lvms-registry-proxy.engineering.redha…
jakobmoellerdev Jul 22, 2024
276042a
chore: change next legacy comment of TopoLVM to future
jakobmoellerdev Jul 22, 2024
6dcc336
chore: pr comments
jakobmoellerdev Jul 23, 2024
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
14 changes: 0 additions & 14 deletions assets/components/lvms/csi-driver.yaml

This file was deleted.

444 changes: 444 additions & 0 deletions assets/components/lvms/lvm.topolvm.io_lvmclusters.yaml

Large diffs are not rendered by default.

114 changes: 114 additions & 0 deletions assets/components/lvms/lvm.topolvm.io_lvmvolumegroupnodestatuses.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
creationTimestamp: null
name: lvmvolumegroupnodestatuses.lvm.topolvm.io
spec:
group: lvm.topolvm.io
names:
kind: LVMVolumeGroupNodeStatus
listKind: LVMVolumeGroupNodeStatusList
plural: lvmvolumegroupnodestatuses
singular: lvmvolumegroupnodestatus
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: LVMVolumeGroupNodeStatus is the Schema for the lvmvolumegroupnodestatuses
API
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: LVMVolumeGroupNodeStatusSpec defines the desired state of
LVMVolumeGroupNodeStatus
properties:
nodeStatus:
description: NodeStatus contains the per node status of the VG
items:
properties:
deviceDiscoveryPolicy:
default: RuntimeDynamic
description: |-
DeviceDiscoveryPolicy is a field to indicate whether the devices are discovered
at runtime or preconfigured through a DeviceSelector
Setting this to DeviceDiscoveryPolicyPreconfigured indicates the devices are preconfigured through a DeviceSelector.
Setting this to DeviceDiscoveryPolicyRuntimeDynamic indicates the devices are added to the VG dynamically if they are present at runtime.
By default, the value is set to RuntimeDynamic.
enum:
- Preconfigured
- RuntimeDynamic
type: string
devices:
description: Devices is the list of devices used by the volume
group
items:
type: string
type: array
excluded:
description: |-
Excluded contains the per node status of applied device exclusions that were picked up via selector,
but were not used for other reasons.
items:
properties:
name:
description: Name is the device that was filtered
type: string
reasons:
description: Reasons are the human-readable reasons why
the device was excluded from the volume group
items:
type: string
type: array
required:
- name
- reasons
type: object
type: array
name:
description: Name is the name of the volume group
type: string
reason:
description: Reason provides more detail on the volume group
creation status
type: string
status:
description: Status tells if the volume group was created on
the node
type: string
type: object
type: array
type: object
status:
description: LVMVolumeGroupNodeStatusStatus defines the observed state
of LVMVolumeGroupNodeStatus
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
214 changes: 214 additions & 0 deletions assets/components/lvms/lvm.topolvm.io_lvmvolumegroups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
creationTimestamp: null
name: lvmvolumegroups.lvm.topolvm.io
spec:
group: lvm.topolvm.io
names:
kind: LVMVolumeGroup
listKind: LVMVolumeGroupList
plural: lvmvolumegroups
singular: lvmvolumegroup
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: LVMVolumeGroup is the Schema for the lvmvolumegroups API
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: LVMVolumeGroupSpec defines the desired state of LVMVolumeGroup
properties:
default:
description: Default is a flag to indicate whether the device-class
is the default
type: boolean
deviceSelector:
description: DeviceSelector is a set of rules that should match for
a device to be included in this TopoLVMCluster
properties:
forceWipeDevicesAndDestroyAllData:
description: |-
ForceWipeDevicesAndDestroyAllData is a flag to force wipe the selected devices.
This wipes the file signatures on the devices. Use this feature with caution.
Force wipe the devices only when you know that they do not contain any important data.
type: boolean
optionalPaths:
description: OptionalPaths specify the optional device paths.
items:
type: string
type: array
paths:
description: Paths specify the device paths.
items:
type: string
type: array
type: object
nodeSelector:
description: NodeSelector chooses nodes
properties:
nodeSelectorTerms:
description: Required. A list of node selector terms. The terms
are ORed.
items:
description: |-
A null or empty node selector term matches no objects. The requirements of
them are ANDed.
The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
properties:
matchExpressions:
description: A list of node selector requirements by node's
labels.
items:
description: |-
A node selector requirement is a selector that contains values, a key, and an operator
that relates the key and values.
properties:
key:
description: The label key that the selector applies
to.
type: string
operator:
description: |-
Represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
type: string
values:
description: |-
An array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. If the operator is Gt or Lt, the values
array must have a single element, which will be interpreted as an integer.
This array is replaced during a strategic merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchFields:
description: A list of node selector requirements by node's
fields.
items:
description: |-
A node selector requirement is a selector that contains values, a key, and an operator
that relates the key and values.
properties:
key:
description: The label key that the selector applies
to.
type: string
operator:
description: |-
Represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
type: string
values:
description: |-
An array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. If the operator is Gt or Lt, the values
array must have a single element, which will be interpreted as an integer.
This array is replaced during a strategic merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
type: object
x-kubernetes-map-type: atomic
type: array
x-kubernetes-list-type: atomic
required:
- nodeSelectorTerms
type: object
x-kubernetes-map-type: atomic
thinPoolConfig:
description: ThinPoolConfig contains configurations for the thin-pool
properties:
chunkSize:
anyOf:
- type: integer
- type: string
description: |-
ChunkSize specifies the statically calculated chunk size for the thin pool.
Thus, It is only used when the ChunkSizeCalculationPolicy is set to Static.
No ChunkSize with a ChunkSizeCalculationPolicy set to Static will result in a default chunk size of 128Ki.
It can be between 64Ki and 1Gi due to the underlying limitations of lvm2.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
chunkSizeCalculationPolicy:
default: Static
description: |-
ChunkSizeCalculationPolicy specifies the policy to calculate the chunk size for the underlying volume.
When set to Host, the chunk size is calculated based on the lvm2 host setting on the node.
When set to Static, the chunk size is calculated based on the static size attribute provided within ChunkSize.
enum:
- Host
- Static
type: string
name:
description: Name specifies a name for the thin pool.
type: string
overprovisionRatio:
description: OverProvisionRatio specifies a factor by which you
can provision additional storage based on the available storage
in the thin pool. To prevent over-provisioning through validation,
set this field to 1.
minimum: 1
type: integer
sizePercent:
default: 90
description: SizePercent specifies the percentage of space in
the LVM volume group for creating the thin pool.
maximum: 90
minimum: 10
type: integer
required:
- name
- overprovisionRatio
type: object
type: object
status:
description: LVMVolumeGroupStatus defines the observed state of LVMVolumeGroup
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: lvms-metrics
namespace: openshift-storage
rules:
- apiGroups:
- ""
resources:
- services
- endpoints
- pods
verbs:
- get
- list
- watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
creationTimestamp: null
name: lvms-metrics
namespace: openshift-storage
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: lvms-metrics
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: openshift-monitoring
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.openshift.io/serving-cert-secret-name: lvms-operator-metrics-cert
creationTimestamp: null
labels:
app.kubernetes.io/compose: metrics
app.kubernetes.io/name: lvms-operator
name: lvms-operator-metrics-service
namespace: openshift-storage
spec:
ports:
- name: https
port: 443
protocol: TCP
targetPort: 8443
selector:
app.kubernetes.io/name: lvms-operator
status:
loadBalancer: {}
Loading