Skip to content

Commit 54962bb

Browse files
authored
release openebs 4.0.0 (#5121)
* update openebs localprovisioner image * undo 3.10 changes * openebs 4.0.0 * no CRDs
1 parent 168be3a commit 54962bb

13 files changed

+676
-24
lines changed

addons/openebs/4.0.0/Manifest

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
image linux-utils openebs/linux-utils:4.0.0
2+
image provisioner-localpv openebs/provisioner-localpv:4.0.0

addons/openebs/4.0.0/install.sh

+436
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resources:
2+
- crds.yaml
+178
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
---
2+
# Source: localpv-provisioner/templates/rbac.yaml
3+
apiVersion: v1
4+
kind: ServiceAccount
5+
metadata:
6+
name: openebs-localpv-provisioner
7+
labels:
8+
chart: localpv-provisioner-4.0.0
9+
heritage: Helm
10+
openebs.io/version: "4.0.0"
11+
app: localpv-provisioner
12+
release: openebs
13+
component: "localpv-provisioner"
14+
openebs.io/component-name: openebs-localpv-provisioner
15+
---
16+
# Source: localpv-provisioner/templates/rbac.yaml
17+
apiVersion: rbac.authorization.k8s.io/v1
18+
kind: ClusterRole
19+
metadata:
20+
name: openebs-localpv-provisioner
21+
labels:
22+
chart: localpv-provisioner-4.0.0
23+
heritage: Helm
24+
openebs.io/version: "4.0.0"
25+
app: localpv-provisioner
26+
release: openebs
27+
component: "localpv-provisioner"
28+
openebs.io/component-name: openebs-localpv-provisioner
29+
rules:
30+
- apiGroups: ["*"]
31+
resources: ["nodes"]
32+
verbs: ["get", "list", "watch"]
33+
- apiGroups: ["*"]
34+
resources: ["namespaces", "pods", "events", "endpoints"]
35+
verbs: ["*"]
36+
- apiGroups: ["*"]
37+
resources: ["resourcequotas", "limitranges"]
38+
verbs: ["list", "watch"]
39+
- apiGroups: ["*"]
40+
resources: ["storageclasses", "persistentvolumeclaims", "persistentvolumes"]
41+
verbs: ["*"]
42+
- apiGroups: ["apiextensions.k8s.io"]
43+
resources: ["customresourcedefinitions"]
44+
verbs: [ "get", "list", "create", "update", "delete", "patch"]
45+
- apiGroups: ["openebs.io"]
46+
resources: [ "*"]
47+
verbs: ["*" ]
48+
- apiGroups: ["coordination.k8s.io"]
49+
resources: ["leases"]
50+
verbs: ["get", "create", "update"]
51+
- nonResourceURLs: ["/metrics"]
52+
verbs: ["get"]
53+
---
54+
# Source: localpv-provisioner/templates/rbac.yaml
55+
apiVersion: rbac.authorization.k8s.io/v1
56+
kind: ClusterRoleBinding
57+
metadata:
58+
name: openebs-localpv-provisioner
59+
labels:
60+
chart: localpv-provisioner-4.0.0
61+
heritage: Helm
62+
openebs.io/version: "4.0.0"
63+
app: localpv-provisioner
64+
release: openebs
65+
component: "localpv-provisioner"
66+
openebs.io/component-name: openebs-localpv-provisioner
67+
roleRef:
68+
apiGroup: rbac.authorization.k8s.io
69+
kind: ClusterRole
70+
name: openebs-localpv-provisioner
71+
subjects:
72+
- kind: ServiceAccount
73+
name: openebs-localpv-provisioner
74+
namespace: __OPENEBS_NAMESPACE__
75+
---
76+
# Source: localpv-provisioner/templates/deployment.yaml
77+
apiVersion: apps/v1
78+
kind: Deployment
79+
metadata:
80+
name: openebs-localpv-provisioner
81+
labels:
82+
chart: localpv-provisioner-4.0.0
83+
heritage: Helm
84+
openebs.io/version: "4.0.0"
85+
app: localpv-provisioner
86+
release: openebs
87+
component: "localpv-provisioner"
88+
openebs.io/component-name: openebs-localpv-provisioner
89+
spec:
90+
replicas: 1
91+
strategy:
92+
type: "Recreate"
93+
rollingUpdate: null
94+
selector:
95+
matchLabels:
96+
app: localpv-provisioner
97+
release: openebs
98+
component: "localpv-provisioner"
99+
template:
100+
metadata:
101+
labels:
102+
chart: localpv-provisioner-4.0.0
103+
heritage: Helm
104+
openebs.io/version: "4.0.0"
105+
app: localpv-provisioner
106+
release: openebs
107+
component: "localpv-provisioner"
108+
openebs.io/component-name: openebs-localpv-provisioner
109+
110+
name: openebs-localpv-provisioner
111+
spec:
112+
serviceAccountName: openebs-localpv-provisioner
113+
securityContext:
114+
{}
115+
containers:
116+
- name: openebs-localpv-provisioner
117+
image: "openebs/provisioner-localpv:4.0.0"
118+
imagePullPolicy: IfNotPresent
119+
resources:
120+
limits:
121+
cpu: 100m
122+
memory: 128Mi
123+
requests:
124+
cpu: 100m
125+
memory: 128Mi
126+
env:
127+
# OPENEBS_IO_K8S_MASTER enables openebs provisioner to connect to K8s
128+
# based on this address. This is ignored if empty.
129+
# This is supported for openebs provisioner version 0.5.2 onwards
130+
#- name: OPENEBS_IO_K8S_MASTER
131+
# value: "http://10.128.0.12:8080"
132+
# OPENEBS_IO_KUBE_CONFIG enables openebs provisioner to connect to K8s
133+
# based on this config. This is ignored if empty.
134+
# This is supported for openebs provisioner version 0.5.2 onwards
135+
#- name: OPENEBS_IO_KUBE_CONFIG
136+
# value: "/home/ubuntu/.kube/config"
137+
- name: OPENEBS_NAMESPACE
138+
valueFrom:
139+
fieldRef:
140+
fieldPath: metadata.namespace
141+
- name: NODE_NAME
142+
valueFrom:
143+
fieldRef:
144+
fieldPath: spec.nodeName
145+
# OPENEBS_SERVICE_ACCOUNT provides the service account of this pod as
146+
# environment variable
147+
- name: OPENEBS_SERVICE_ACCOUNT
148+
valueFrom:
149+
fieldRef:
150+
fieldPath: spec.serviceAccountName
151+
# OPENEBS_IO_BASE_PATH is the environment variable that provides the
152+
# default base path on the node where host-path PVs will be provisioned.
153+
- name: OPENEBS_IO_ENABLE_ANALYTICS
154+
value: "false"
155+
- name: OPENEBS_IO_BASE_PATH
156+
value: "/var/openebs/local"
157+
- name: OPENEBS_IO_HELPER_IMAGE
158+
value: "openebs/linux-utils:4.0.0"
159+
- name: OPENEBS_IO_INSTALLER_TYPE
160+
value: "localpv-charts-helm"
161+
# LEADER_ELECTION_ENABLED is used to enable/disable leader election. By default
162+
# leader election is enabled.
163+
- name: LEADER_ELECTION_ENABLED
164+
value: "true"
165+
# Process name used for matching is limited to the 15 characters
166+
# present in the pgrep output.
167+
# So fullname can't be used here with pgrep (>15 chars).A regular expression
168+
# that matches the entire command name has to specified.
169+
# Anchor `^` : matches any string that starts with `provisioner-loc`
170+
# `.*`: matches any string that has `provisioner-loc` followed by zero or more char
171+
livenessProbe:
172+
exec:
173+
command:
174+
- sh
175+
- -c
176+
- test `pgrep -c "^provisioner-loc.*"` = 1
177+
initialDelaySeconds: 30
178+
periodSeconds: 60

addons/openebs/4.0.0/spec/storage/kustomization.yaml

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: storage.k8s.io/v1
2+
kind: StorageClass
3+
metadata:
4+
name: ${OPENEBS_LOCALPV_STORAGE_CLASS}
5+
annotations:
6+
openebs.io/cas-type: local
7+
cas.openebs.io/config: |
8+
- name: BasePath
9+
value: "/var/openebs/local"
10+
- name: StorageType
11+
value: "hostpath"
12+
provisioner: openebs.io/local
13+
reclaimPolicy: Delete
14+
volumeBindingMode: WaitForFirstConsumer
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: storage.k8s.io/v1
2+
kind: StorageClass
3+
metadata:
4+
name: ${OPENEBS_LOCALPV_STORAGE_CLASS}
5+
annotations:
6+
storageclass.kubernetes.io/is-default-class: "true"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace: ${OPENEBS_NAMESPACE}
2+
3+
resources:
4+
- namespace.yaml
5+
- openebs.yaml
6+
- troubleshoot.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: ${OPENEBS_NAMESPACE}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: kurl-openebs-supportbundle-spec
5+
labels:
6+
troubleshoot.io/kind: support-bundle
7+
data:
8+
support-bundle-spec: |
9+
apiVersion: troubleshoot.sh/v1beta2
10+
kind: SupportBundle
11+
spec:
12+
collectors:
13+
- logs:
14+
namespace: ${OPENEBS_NAMESPACE}
15+
name: openebs/logs

addons/openebs/template/base/install.sh

-14
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ function openebs() {
2525

2626
secure_openebs
2727

28-
openebs_apply_crds
29-
3028
# migrate resources that are changing names
3129
openebs_migrate_pre_helm_resources
3230

@@ -158,18 +156,6 @@ function openebs_prompt_migrate_from_rook() {
158156
fi
159157
}
160158

161-
function openebs_apply_crds() {
162-
local src="$DIR/addons/openebs/$OPENEBS_VERSION/spec/crds"
163-
local dst="$DIR/kustomize/openebs/spec/crds"
164-
165-
mkdir -p "$dst"
166-
167-
cp "$src/kustomization.yaml" "$dst/"
168-
cp "$src/crds.yaml" "$dst/"
169-
170-
kubectl apply -k "$dst/"
171-
}
172-
173159
function openebs_apply_operator() {
174160
local src="$DIR/addons/openebs/$OPENEBS_VERSION/spec"
175161
local dst="$DIR/kustomize/openebs/spec"

addons/openebs/template/generate.sh

+11-10
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,19 @@ function generate() {
1818
# localpv
1919
tmpdir="$dir/tmpdir"
2020
mkdir -p "$tmpdir"
21-
helm template -n '__OPENEBS_NAMESPACE__' openebs openebs/openebs --version "$chart_version" \
21+
helm template -n '__OPENEBS_NAMESPACE__' openebs openebs-localpv/localpv-provisioner --version "$chart_version" \
2222
--include-crds \
23-
--set defaultStorageConfig.enabled=false \
24-
--set localprovisioner.enableDeviceClass=false \
25-
--set localprovisioner.enableHostpathClass=false \
26-
--set ndm.enabled=false \
27-
--set ndmOperator.enabled=false \
23+
--set analytics.enabled=false \
24+
--set hostpathClass.enabled=false \
25+
--set localpv.resources.requests.cpu=100m \
26+
--set localpv.resources.limits.cpu=100m \
27+
--set localpv.resources.requests.memory=128Mi \
28+
--set localpv.resources.limits.memory=128Mi \
2829
> "$tmpdir/openebs.tmpl.yaml"
2930

3031
$ksplit_path crdsplit "$tmpdir/"
3132
mv "$tmpdir/AllResources.yaml" "$dir/spec/openebs.tmpl.yaml"
32-
mv "$tmpdir/CustomResourceDefinitions.yaml" "$dir/spec/crds/crds.yaml"
33+
# mv "$tmpdir/CustomResourceDefinitions.yaml" "$dir/spec/crds/crds.yaml"
3334
rm -rf "$tmpdir"
3435

3536
# get images in files
@@ -51,10 +52,10 @@ function get_ksplit() {
5152
}
5253

5354
function get_latest_release_version() {
54-
app_version=$(helm show chart --version "$version_flag" openebs/openebs | \
55+
app_version=$(helm show chart --version "$version_flag" openebs-localpv/localpv-provisioner | \
5556
grep -i "^appVersion" | \
5657
grep -Eo "[0-9]\.[0-9]+\.[0-9]+")
57-
chart_version=$(helm show chart --version "$version_flag" openebs/openebs | \
58+
chart_version=$(helm show chart --version "$version_flag" openebs-localpv/localpv-provisioner | \
5859
grep -i "^version" | \
5960
grep -Eo "[0-9]+\.[0-9]+\.[0-9]+")
6061
}
@@ -91,7 +92,7 @@ function main() {
9192
parse_flags "$@"
9293

9394
# run the helm commands
94-
helm repo add openebs https://openebs.github.io/charts
95+
helm repo add openebs-localpv https://openebs.github.io/dynamic-localpv-provisioner
9596
helm repo update
9697

9798
local app_version=

web/src/installers/versions.js

+2
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,8 @@ module.exports.InstallerVersions = {
531531
"1.2.0",
532532
],
533533
openebs: [
534+
// cron-openebs-update-4
535+
"4.0.0",
534536
// cron-openebs-update-3
535537
"3.10.0",
536538
"3.9.0",

0 commit comments

Comments
 (0)