Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ header:
- 'olaris/**'
- 'skip-test'
- '.env.dist'
- '**/ow_pod_templates.yaml'


dependency:
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ ADD --chown=nuvolaris:nuvolaris deploy/etcd /home/nuvolaris/deploy/etcd
ADD --chown=nuvolaris:nuvolaris deploy/milvus-operator /home/nuvolaris/deploy/milvus-operator
ADD --chown=nuvolaris:nuvolaris deploy/milvus /home/nuvolaris/deploy/milvus
ADD --chown=nuvolaris:nuvolaris deploy/milvus-slim /home/nuvolaris/deploy/milvus-slim
ADD --chown=nuvolaris:nuvolaris deploy/registry /home/nuvolaris/deploy/registry
ADD --chown=nuvolaris:nuvolaris quota.sh /home/nuvolaris/

#------------------------------------------------------------------------------
Expand Down
15 changes: 13 additions & 2 deletions actions/devel/download/common/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.
#

import mimetypes
import json

def get_env_value(user_data, key):
"""
Expand All @@ -32,4 +32,15 @@ def get_env_value(user_data, key):
if env['key'] == key:
return env['value']

return None
return None

def is_json(value):
if isinstance(value, (dict, list)): # Already a JSON-compatible structure
return True
if isinstance(value, str): # Try parsing if it's a string
try:
json.loads(value)
return True
except json.JSONDecodeError:
return False
return False
15 changes: 13 additions & 2 deletions actions/devel/upload/common/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.
#

import mimetypes
import json

def get_env_value(user_data, key):
"""
Expand All @@ -32,4 +32,15 @@ def get_env_value(user_data, key):
if env['key'] == key:
return env['value']

return None
return None

def is_json(value):
if isinstance(value, (dict, list)): # Already a JSON-compatible structure
return True
if isinstance(value, str): # Try parsing if it's a string
try:
json.loads(value)
return True
except json.JSONDecodeError:
return False
return False
52 changes: 49 additions & 3 deletions deploy/nuvolaris-permissions/whisk-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ spec:
type: boolean
milvus:
description: deploys Milvus Operator to support deployment of MILVUS Vector DB
type: boolean
type: boolean
registry:
description: deploys a private registry to load on the fly generated action runtimes (false by default)
type: boolean
required:
- openwhisk
- couchdb
Expand Down Expand Up @@ -794,7 +797,45 @@ spec:
type: string
collection:
description: nuvolaris MILVUS collection (default to nuvolaris)
type: string
type: string
registry:
description: used to configure the internal docker compliant registry
type: object
properties:
mode:
description: deployment mode can be internal/external (default to internal)
type: string
volume-size:
description: volume size in GB, default to 50GB
type: integer
auth:
description: used to configure the REGISTRY user to push and pull images from
type: object
properties:
username:
type: string
password:
type: string
required:
- username
- password
hostname:
description: used to configure the repo hostname (if set to auto and mode=internal it will be img.<apihost>)
type: string
ingress:
description: configuration option for global REGISTRY ingresses exposure, will be taken into account only if deployment=interna
type: object
properties:
enabled:
description: boolean flag to activate a REGISTRY ingress. Default to false
type: boolean
required:
- enabled
required:
- mode
- volume-size
- auth
- hostname
status:
x-kubernetes-preserve-unknown-fields: true
# type: object
Expand Down Expand Up @@ -902,4 +943,9 @@ spec:
type: string
priority: 0
jsonPath: .status.whisk_create.milvus
description: Milvus
description: Milvus
- name: Registry
type: string
priority: 0
jsonPath: .status.whisk_create.registry
description: Registry
31 changes: 31 additions & 0 deletions deploy/openwhisk-invoker/invoker-conf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
apiVersion: v1
kind: ConfigMap
metadata:
name: openwhisk-pod-templates
namespace: nuvolaris
data:
ow_pod_templates.yaml: |
apiVersion: v1
kind: Pod
spec:
imagePullSecrets:
- name: registry-pull-secret

31 changes: 31 additions & 0 deletions deploy/openwhisk-standalone/standalone-conf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
apiVersion: v1
kind: ConfigMap
metadata:
name: openwhisk-pod-templates
namespace: nuvolaris
data:
ow_pod_templates.yaml: |
apiVersion: v1
kind: Pod
spec:
imagePullSecrets:
- name: registry-pull-secret

26 changes: 26 additions & 0 deletions deploy/registry/00-registry-secret-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
apiVersion: v1
kind: Secret
metadata:
name: registry-pull-secret
namespace: nuvolaris
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: eyJhdXRocyI6IHsibnV2b2xhcmlzLXJlZ2lzdHJ5LXN2YyI6IHsidXNlcm5hbWUiOiAib3BlbnNlcnZlcmxlc3MiLCAicGFzc3dvcmQiOiAiNHB3ZHJlZ2lzdHJ5IiwgImF1dGgiOiAiYjNCbGJuTmxjblpsY214bGMzTTZOSEIzWkhKbFoybHpkSEo1In19fQ==
26 changes: 26 additions & 0 deletions deploy/registry/00-registry-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
apiVersion: v1
data:
htpasswd: bXl1c2VyOiQyeSQwNSRVWm9Tb044Q1JWc0VSaUZieVJvWWV1eTU1NGxmOTZtYWZBR1BrODJYeFppbE55bHVHa0dNbQoK
kind: Secret
metadata:
name: registry-auth-secret
namespace: nuvolaris
type: Opaque
32 changes: 32 additions & 0 deletions deploy/registry/01-registry-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: registry-pvc
namespace: nuvolaris
labels:
app: registry-pvc
spec:
accessModes:
- ReadWriteOnce
storageClassName: standard
resources:
requests:
storage: 10Gi
66 changes: 66 additions & 0 deletions deploy/registry/02-registry-sts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: registry
namespace: nuvolaris
labels:
name: registry
app: registry
spec:
replicas: 1
serviceName: nuvolaris-registry-svc
selector:
matchLabels:
app: registry
name: registry
template:
metadata:
labels:
app: registry
name: registry
spec:
containers:
- name: registry
image: registry:3.0.0
ports:
- containerPort: 5000
env:
- name: REGISTRY_AUTH
value: "htpasswd"
- name: REGISTRY_AUTH_HTPASSWD_REALM
value: "Registry Realm"
- name: REGISTRY_AUTH_HTPASSWD_PATH
value: "/auth/htpasswd"
- name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
value: "/var/lib/registry"
volumeMounts:
- name: registry-pvc
mountPath: /var/lib/registry
- name: auth-volume
mountPath: /auth
readOnly: true
volumes:
- name: registry-pvc
persistentVolumeClaim:
claimName: registry-pvc
- name: auth-volume
secret:
secretName: registry-auth-secret
31 changes: 31 additions & 0 deletions deploy/registry/03-registry-svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
apiVersion: v1
kind: Service
metadata:
name: nuvolaris-registry-svc
namespace: nuvolaris
spec:
selector:
app: registry
ports:
- protocol: TCP
port: 5000
targetPort: 5000
type: ClusterIP
Loading
Loading