Skip to content

Commit 94871fc

Browse files
authored
Merge pull request #100 from d4rkstar/main
feat: slim mode
2 parents 9df941d + f23781b commit 94871fc

File tree

7 files changed

+85
-12
lines changed

7 files changed

+85
-12
lines changed

config/docopts.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ Usage:
4646
config aks [--project=<project>] [--name=<name>] [--region=<region>] [--count=<count>] [--vm=<vm>] [--disk=<disk>] [--key=<key>]
4747
config (status|export|reset)
4848
config use [<n>] [--delete] [--rename=<rename>]
49-
config minimal
49+
config minimal
50+
config slim
5051
```
5152

5253
## Commands
@@ -78,6 +79,7 @@ Usage:
7879
config export export all the variables
7980
config use use a different kubernetes cluster among those you created
8081
config minimal shortcut for ops config enabling only redis,mongodb,minio,cron,static,postgres
82+
config slim shortcut for ops config slim, but adding lightweight milvus and other sizing improvements
8183
```
8284

8385
## Options

config/opsfile.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,4 +1118,28 @@ tasks:
11181118
config OPERATOR_COMPONENT_STATIC=true
11191119
- |
11201120
config OPERATOR_COMPONENT_POSTGRES=true
1121-
- task: status
1121+
- task: status
1122+
1123+
slim:
1124+
silent: true
1125+
cmds:
1126+
- |
1127+
config OPERATOR_COMPONENT_INVOKER=false
1128+
config OPERATOR_COMPONENT_ZOOKEEPER=false
1129+
config OPERATOR_COMPONENT_KAFKA=false
1130+
config OPERATOR_COMPONENT_REDIS=true
1131+
config OPERATOR_COMPONENT_MONGODB=true
1132+
config OPERATOR_COMPONENT_MINIO=true
1133+
config OPERATOR_COMPONENT_CRON=false
1134+
config OPERATOR_COMPONENT_STATIC=true
1135+
config OPERATOR_COMPONENT_POSTGRES=true
1136+
config OPERATOR_COMPONENT_ETCD=true
1137+
config OPERATOR_COMPONENT_MILVUS=true
1138+
config OPERATOR_CONFIG_AFFINITY=true
1139+
config OPERATOR_CONFIG_TOLERATIONS=true
1140+
config ETCD_CONFIG_REPLICAS=1
1141+
config POSTGRES_CONFIG_REPLICAS=1
1142+
config OPERATOR_CONFIG_SLIM=true
1143+
- |
1144+
config OPENWHISK_INVOKER_CONTAINER_POOL_MEMORY=6
1145+
- task: status

opsroot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"coreutils": "arch b2sum b3sum base32 basename basenc cat chgrp chmod chown chroot cksum comm cp csplit cut date dd df dir dircolors dirname du env expand expr factor fmt fold groups hashsum head hostid hostname id install join kill link ln logname ls md5sum mkdir mkfifo mknod mktemp more mv nice nl nohup nproc numfmt od paste pathchk pinky pr printenv printf ptx pwd readlink realpath rm rmdir seq sha1sum sha224sum sha256sum sha3-224sum sha3-256sum sha3-384sum sha3-512sum sha384sum sha3sum sha512sum shake128sum shake256sum shred shuf sleep sort split stat stdbuf stty sum sync tac tail tee timeout touch tr truncate tsort tty uname unexpand uniq unlink uptime users vdir wc who whoami yes"
66
},
77
"images": {
8-
"operator": "apache/openserverless-operator:0.1.0-incubating.2504061956",
8+
"operator": "apache/openserverless-operator:0.1.0-incubating.2506170946",
99
"controller": "ghcr.io/nuvolaris/openwhisk-controller:3.1.0-mastrogpt.2402101445",
1010
"invoker": "ghcr.io/nuvolaris/openwhisk-invoker:3.1.0-mastrogpt.2402101445"
1111
}

setup/kubernetes/crds/whisk-crd.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ spec:
8282
type: boolean
8383
tolerations:
8484
description: enable/disable openwhisk toleration. This flag can be true only on multinode cluster deployment. Default to false
85-
type: boolean
85+
type: boolean
86+
slim:
87+
description: boolean flag to enable/disable nuvolaris slim mode. Defaulted to false
88+
type: boolean
8689
required:
8790
- password
8891
components:

setup/kubernetes/opsfile.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ tasks:
189189
- "kubectl apply -f common -f roles -f crds"
190190

191191
storageclass-env:
192+
silent: true
192193
vars:
193194
OP_VOL_STORAGE_CLASS:
194195
sh: |
@@ -276,6 +277,7 @@ tasks:
276277

277278
permission:
278279
desc: assign permissions (required cluster-admin)
280+
silent: true
279281
cmds:
280282
- task: context
281283
- task: prepare

setup/kubernetes/roles/openwhisk-core-roles.yaml

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,57 @@
1616
# See the License for the specific language governing permissions and
1717
# limitations under the License.
1818
#
19+
# ---
20+
# apiVersion: rbac.authorization.k8s.io/v1
21+
# kind: RoleBinding
22+
# metadata:
23+
# name: openwhisk-core
24+
# namespace: nuvolaris
25+
# roleRef:
26+
# apiGroup: rbac.authorization.k8s.io
27+
# kind: ClusterRole
28+
# name: view
29+
# subjects:
30+
# - kind: ServiceAccount
31+
# name: openwhisk-core
32+
# namespace: nuvolaris
33+
---
34+
apiVersion: v1
35+
kind: ServiceAccount
36+
metadata:
37+
name: nuvolaris-openwhisk-core
38+
namespace: nuvolaris
39+
---
40+
kind: Role
41+
apiVersion: rbac.authorization.k8s.io/v1
42+
metadata:
43+
name: openwhisk-core-role
44+
namespace: nuvolaris
45+
rules:
46+
- apiGroups: ["extensions", "apps"]
47+
resources: ["deployments"]
48+
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
49+
- apiGroups: [""]
50+
resources: ["pods"]
51+
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
52+
- apiGroups: [""]
53+
resources: ["events"]
54+
verbs: ["get", "list"]
55+
- apiGroups: [""]
56+
resources: ["pods/log"]
57+
verbs: ["get", "list"]
1958
---
2059
apiVersion: rbac.authorization.k8s.io/v1
2160
kind: RoleBinding
2261
metadata:
23-
name: openwhisk-core
62+
name: openwhisk-controller-role-rb
2463
namespace: nuvolaris
2564
roleRef:
65+
kind: Role
66+
name: openwhisk-core-role
2667
apiGroup: rbac.authorization.k8s.io
27-
kind: ClusterRole
28-
name: view
2968
subjects:
3069
- kind: ServiceAccount
31-
name: openwhisk-core
70+
name: nuvolaris-openwhisk-core
3271
namespace: nuvolaris
72+

setup/kubernetes/whisk.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,20 @@ spec:
2828
storageclass: ${OPERATOR_CONFIG_STORAGECLASS:-auto}
2929
provisioner: ${OPERATOR_CONFIG_STORAGEPROVISIONER:-auto}
3030
protocol: ${OPERATOR_CONFIG_HOSTPROTOCOL:-auto}
31+
slim: ${OPERATOR_CONFIG_SLIM:-false}
3132
affinity: ${OPERATOR_CONFIG_AFFINITY:-false}
32-
tolerations: ${OPERATOR_CONFIG_TOLERATIONS:-false}
33+
tolerations: ${OPERATOR_CONFIG_TOLERATIONS:-false}
3334
components:
3435
# start openwhisk controller
3536
openwhisk: true
3637
# start openwhisk invoker
37-
invoker: true
38+
invoker: ${OPERATOR_COMPONENT_INVOKER:-true}
3839
# start couchdb
3940
couchdb: true
4041
# start zookeeper
41-
zookeeper: true
42+
zookeeper: ${OPERATOR_COMPONENT_ZOOKEEPER:-true}
4243
# start kafka
43-
kafka: true
44+
kafka: ${OPERATOR_COMPONENT_KAFKA:-true}
4445
# prometheus monitoring enabled or not
4546
monitoring: ${OPERATOR_COMPONENT_PROMETHEUS:-false}
4647
# start mongodb
@@ -234,5 +235,6 @@ spec:
234235
password:
235236
root: $SECRET_MILVUS_ROOT
236237
s3: $SECRET_MILVUS_S3
238+
etcd: $SECRET_ETCD_ROOT
237239
nuvolaris:
238240
password: $SECRET_MILVUS_NUVOLARIS

0 commit comments

Comments
 (0)