nuvolaris/templates/standalone-sts.yaml (191 lines of code) (raw):
---
# Source: openwhisk/templates/controller-pod.yaml
#
# 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: controller
namespace: nuvolaris
labels:
name: controller
app: controller
spec:
serviceName: controller
podManagementPolicy: "Parallel"
replicas: 1
selector:
matchLabels:
name: controller
template:
metadata:
labels:
name: controller
app: controller
annotations:
whisks.nuvolaris.org/annotate-version: "true"
spec:
serviceAccountName: nuvolaris-openwhisk-core
restartPolicy: Always
containers:
- name: controller
imagePullPolicy: "IfNotPresent"
image: "ghcr.io/nuvolaris/openwhisk-controller:0.3.0-morpheus.22122609"
command: ["/bin/bash", "-c", "/init.sh `hostname | awk -F '-' '{print $NF}'`"]
ports:
- name: controller
containerPort: 8080
- name: akka-remoting
containerPort: 25520
- name: akka-mgmt-http
containerPort: 19999
livenessProbe:
httpGet:
path: "/ping"
port: 8080
scheme: "HTTP"
initialDelaySeconds: 40
periodSeconds: 10
timeoutSeconds: 2
readinessProbe:
httpGet:
path: "/ping"
port: 8080
scheme: "HTTP"
initialDelaySeconds: 20
periodSeconds: 10
timeoutSeconds: 10
securityContext:
capabilities:
drop:
- ALL
{% if container_manage_resources %}
resources:
requests:
memory: "{{container_mem_req}}"
cpu : "{{container_cpu_req}}"
limits:
memory: "{{container_mem_lim}}"
cpu : "{{container_cpu_lim}}"
{% endif %}
env:
- name: "PORT"
value: "8080"
- name: "TZ"
value: "UTC"
- name: "POD_IP"
valueFrom:
fieldRef:
fieldPath: status.podIP
# Java options
- name: "JAVA_OPTS"
value: "{{controller_java_opts}} "
# specific controller arguments
- name: "CONTROLLER_OPTS"
value: " "
# action runtimes
- name: "RUNTIMES_MANIFEST"
valueFrom:
configMapKeyRef:
name: openwhisk-runtimes
key: runtimes.json
- name: "CONFIG_whisk_info_date"
value: "01-01-2023"
- name: "CONFIG_whisk_info_buildNo"
value: "development-morpheus"
- name: "CONFIG_whisk_containerPool_userMemory"
value: "{{invoker_containerpool_usermemory}}"
# Action limits
# Required properties from Entitlement Provider used by the controller
- name: "LIMITS_ACTIONS_INVOKES_PERMINUTE"
value: "{{actions_invokes_perMinute}}"
- name: "LIMITS_ACTIONS_INVOKES_CONCURRENT"
value: "{{actions_invokes_concurrent}}"
- name: "LIMITS_TRIGGERS_FIRES_PERMINUTE"
value: "{{triggers_fires_perMinute}}"
- name: "LIMITS_ACTIONS_SEQUENCE_MAXLENGTH"
value: "{{actions_sequence_maxLength}}"
- name: "CONTROLLER_INSTANCES"
value: "1"
- name: "CONFIG_whisk_timeLimit_min"
value: "{{time_limit_min}}"
- name: "CONFIG_whisk_timeLimit_std"
value: "{{time_limit_std}}"
- name: "CONFIG_whisk_timeLimit_max"
value: "{{time_limit_max}}"
- name: "CONFIG_whisk_memory_min"
value: "{{memory_limit_min}}"
- name: "CONFIG_whisk_memory_std"
value: "{{memory_limit_std}}"
- name: "CONFIG_whisk_memory_max"
value: "{{memory_limit_max}}"
- name: "CONFIG_whisk_concurrencyLimit_min"
value: "{{concurrency_limit_min}}"
- name: "CONFIG_whisk_concurrencyLimit_max"
value: "{{concurrency_limit_max}}"
- name: "CONFIG_whisk_concurrencyLimit_std"
value: "{{concurrency_limit_std}}"
- name: "CONFIG_whisk_logLimit_min"
value: "0m"
- name: "CONFIG_whisk_logLimit_max"
value: "10m"
- name: "CONFIG_whisk_logLimit_std"
value: "10m"
- name: "CONFIG_whisk_activation_payload_max"
value: "{{activation_payload_max}}"
- name: "CONFIG_whisk_loadbalancer_blackboxFraction"
value: "10%"
- name: "CONFIG_whisk_loadbalancer_timeoutFactor"
value: "2"
# properties for DB connection
- name: "CONFIG_whisk_couchdb_username"
value: "{{couchdb_admin_user}}"
- name: "CONFIG_whisk_couchdb_password"
value: "{{couchdb_admin_password}}"
- name: "CONFIG_whisk_couchdb_port"
value: "{{couchdb_port}}"
- name: "CONFIG_whisk_couchdb_protocol"
value: "http"
- name: "CONFIG_whisk_couchdb_host"
value: "{{couchdb_host}}"
- name: "CONFIG_whisk_couchdb_provider"
value: "CouchDB"
- name: "CONFIG_whisk_couchdb_databases_WhiskActivation"
value: "nuvolaris_activations"
- name: "CONFIG_whisk_couchdb_databases_WhiskEntity"
value: "nuvolaris_whisks"
- name: "CONFIG_whisk_couchdb_databases_WhiskAuth"
value: "nuvolaris_subjects"
- name: "CONFIG_whisk_couchdb_controller_username"
value: "{{couchdb_controller_user}}"
- name: "CONFIG_whisk_couchdb_controller_password"
value: "{{couchdb_controller_password}}"
- name: "CONFIG_axa_cluster_seedNodes_0"
value: "axa://controller-actor-system@$(POD_IP):25520"
- name: "CONFIG_logback_log_level"
value: "INFO"
# lean mode
- name: "CONFIG_whisk_spi_MessagingProvider"
value: "org.apache.openwhisk.connector.lean.LeanMessagingProvider"
- name: "CONFIG_whisk_spi_LoadBalancerProvider"
value: "org.apache.openwhisk.core.loadBalancer.LeanBalancer"
- name: "CONFIG_whisk_spi_ArtifactStoreProvider"
value: "org.apache.openwhisk.core.database.CouchDbStoreProvider"
- name: "CONFIG_whisk_spi_ContainerFactoryProvider"
value: "org.apache.openwhisk.core.containerpool.kubernetes.KubernetesContainerFactoryProvider"
- name: "CONFIG_whisk_spi_LogStoreProvider"
value: "org.apache.openwhisk.core.containerpool.logging.DockerToActivationLogStoreProvider"
- name: "CONFIG_whisk_controller_protocol"
value: "http"
- name: "CONFIG_whisk_controller_interface"
value: "0.0.0.0"
- name: "CONFIG_whisk_kubernetes_timeouts_run"
value: "10 minute"
- name: "CONFIG_whisk_kubernetes_timeouts_logs"
value: "1 minute"
- name: "CONFIG_whisk_kubernetes_userPodNodeAffinity_enabled"
value: "false"
- name: "CONFIG_whisk_kubernetes_portForwardingEnabled"
value: "false"
- name: "CONFIG_whisk_kubernetes_actionNamespace"
value: "nuvolaris"
- name: "CONFIG_whisk_helm_release"
value: "release"
- name: "CONFIG_kamon_modules_statsdReporter_enabled"
value: "false"
# Properties required by the LeanBalancer provider
- name: "WHISK_API_HOST_PROTO"
value: "http"
- name: "WHISK_API_HOST_PORT"
value: "3233"
- name: "WHISK_API_HOST_NAME"
value: "controller.nuvolaris.svc.cluster.local"