diff --git a/deploy/k8s/kustomize/deploy/base/charts-rendered/nats.yaml b/deploy/k8s/kustomize/deploy/base/charts-rendered/nats.yaml deleted file mode 100644 index f226d3d..0000000 --- a/deploy/k8s/kustomize/deploy/base/charts-rendered/nats.yaml +++ /dev/null @@ -1,396 +0,0 @@ ---- -# Source: nats/templates/pod-disruption-budget.yaml -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - labels: - app.kubernetes.io/component: nats - app.kubernetes.io/instance: nats - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: nats - app.kubernetes.io/version: 2.10.18 - helm.sh/chart: nats-1.2.2 - name: nats -spec: - maxUnavailable: 1 - selector: - matchLabels: - app.kubernetes.io/component: nats - app.kubernetes.io/instance: nats - app.kubernetes.io/name: nats ---- -# Source: nats/templates/nats-box/contexts-secret.yaml -apiVersion: v1 -kind: Secret -metadata: - labels: - app.kubernetes.io/component: nats-box - app.kubernetes.io/instance: nats - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: nats - app.kubernetes.io/version: 2.10.18 - helm.sh/chart: nats-1.2.2 - name: nats-box-contexts -stringData: - default.json: | - { - "url": "nats://nats" - } -type: Opaque ---- -# Source: nats/templates/config-map.yaml -apiVersion: v1 -data: - nats.conf: | - { - "cluster": { - "name": "nats", - "no_advertise": true, - "port": 6222, - "routes": [ - "nats://nats-0.nats-headless:6222", - "nats://nats-1.nats-headless:6222", - "nats://nats-2.nats-headless:6222" - ] - }, - "http_port": 8222, - "jetstream": { - "domain": "default", - "max_file_store": 10Gi, - "max_memory_store": 0, - "store_dir": "/data" - }, - "lame_duck_duration": "30s", - "lame_duck_grace_period": "10s", - "leafnodes": { - "no_advertise": true, - "port": 7422 - }, - "pid_file": "/var/run/nats/nats.pid", - "port": 4222, - "server_name": $SERVER_NAME, - "websocket": { - "no_tls": true, - "port": 4223 - } - } -kind: ConfigMap -metadata: - labels: - app.kubernetes.io/component: nats - app.kubernetes.io/instance: nats - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: nats - app.kubernetes.io/version: 2.10.18 - helm.sh/chart: nats-1.2.2 - name: nats-config ---- -# Source: nats/templates/headless-service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: nats - app.kubernetes.io/instance: nats - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: nats - app.kubernetes.io/version: 2.10.18 - helm.sh/chart: nats-1.2.2 - name: nats-headless -spec: - clusterIP: None - ports: - - appProtocol: tcp - name: nats - port: 4222 - targetPort: nats - - appProtocol: tcp - name: leafnodes - port: 7422 - targetPort: leafnodes - - appProtocol: http - name: websocket - port: 4223 - targetPort: websocket - - appProtocol: tcp - name: cluster - port: 6222 - targetPort: cluster - - appProtocol: http - name: monitor - port: 8222 - targetPort: monitor - publishNotReadyAddresses: true - selector: - app.kubernetes.io/component: nats - app.kubernetes.io/instance: nats - app.kubernetes.io/name: nats ---- -# Source: nats/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: nats - app.kubernetes.io/instance: nats - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: nats - app.kubernetes.io/version: 2.10.18 - helm.sh/chart: nats-1.2.2 - name: nats -spec: - ports: - - appProtocol: tcp - name: nats - port: 4222 - targetPort: nats - - appProtocol: tcp - name: leafnodes - port: 7422 - targetPort: leafnodes - - appProtocol: http - name: websocket - port: 4223 - targetPort: websocket - selector: - app.kubernetes.io/component: nats - app.kubernetes.io/instance: nats - app.kubernetes.io/name: nats ---- -# Source: nats/templates/nats-box/deployment.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/component: nats-box - app.kubernetes.io/instance: nats - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: nats - app.kubernetes.io/version: 2.10.18 - helm.sh/chart: nats-1.2.2 - name: nats-box -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/component: nats-box - app.kubernetes.io/instance: nats - app.kubernetes.io/name: nats - template: - metadata: - labels: - app.kubernetes.io/component: nats-box - app.kubernetes.io/instance: nats - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: nats - app.kubernetes.io/version: 2.10.18 - helm.sh/chart: nats-1.2.2 - spec: - containers: - - args: - - sh - - -ec - - trap true INT TERM; sleep infinity & wait - command: - - sh - - -ec - - | - work_dir="$(pwd)" - mkdir -p "$XDG_CONFIG_HOME/nats" - cd "$XDG_CONFIG_HOME/nats" - if ! [ -s context ]; then - ln -s /etc/nats-contexts context - fi - if ! [ -f context.txt ]; then - echo -n "default" > context.txt - fi - cd "$work_dir" - exec /entrypoint.sh "$@" - - -- - image: natsio/nats-box:0.14.3 - name: nats-box - volumeMounts: - - mountPath: /etc/nats-contexts - name: contexts - enableServiceLinks: false - volumes: - - name: contexts - secret: - secretName: nats-box-contexts ---- -# Source: nats/templates/stateful-set.yaml -apiVersion: apps/v1 -kind: StatefulSet -metadata: - labels: - app.kubernetes.io/component: nats - app.kubernetes.io/instance: nats - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: nats - app.kubernetes.io/version: 2.10.18 - helm.sh/chart: nats-1.2.2 - name: nats -spec: - podManagementPolicy: Parallel - replicas: 3 - selector: - matchLabels: - app.kubernetes.io/component: nats - app.kubernetes.io/instance: nats - app.kubernetes.io/name: nats - serviceName: nats-headless - template: - metadata: - annotations: - checksum/config: 4072a7d85dd61c05c752b5cbaa8912b8cfff97c9350e7d79af810f517476bf3a - labels: - app.kubernetes.io/component: nats - app.kubernetes.io/instance: nats - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: nats - app.kubernetes.io/version: 2.10.18 - helm.sh/chart: nats-1.2.2 - spec: - containers: - - args: - - --config - - /etc/nats-config/nats.conf - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: SERVER_NAME - value: $(POD_NAME) - image: nats:2.10.18-alpine - lifecycle: - preStop: - exec: - command: - - nats-server - - -sl=ldm=/var/run/nats/nats.pid - livenessProbe: - failureThreshold: 3 - httpGet: - path: /healthz?js-enabled-only=true - port: monitor - initialDelaySeconds: 10 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 5 - name: nats - ports: - - containerPort: 4222 - name: nats - - containerPort: 7422 - name: leafnodes - - containerPort: 4223 - name: websocket - - containerPort: 6222 - name: cluster - - containerPort: 8222 - name: monitor - readinessProbe: - failureThreshold: 3 - httpGet: - path: /healthz?js-server-only=true - port: monitor - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 - startupProbe: - failureThreshold: 90 - httpGet: - path: /healthz - port: monitor - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 - volumeMounts: - - mountPath: /etc/nats-config - name: config - - mountPath: /var/run/nats - name: pid - - mountPath: /data - name: nats-js - - args: - - -pid - - /var/run/nats/nats.pid - - -config - - /etc/nats-config/nats.conf - image: natsio/nats-server-config-reloader:0.15.0 - name: reloader - volumeMounts: - - mountPath: /var/run/nats - name: pid - - mountPath: /etc/nats-config - name: config - enableServiceLinks: false - shareProcessNamespace: true - volumes: - - configMap: - name: nats-config - name: config - - emptyDir: {} - name: pid - volumeClaimTemplates: - - metadata: - name: nats-js - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi ---- -# Source: nats/templates/tests/request-reply.yaml -apiVersion: v1 -kind: Pod -metadata: - annotations: - helm.sh/hook: test - helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded - labels: - app.kubernetes.io/component: test-request-reply - app.kubernetes.io/instance: nats - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: nats - app.kubernetes.io/version: 2.10.18 - helm.sh/chart: nats-1.2.2 - name: nats-test-request-reply -spec: - containers: - - args: - - sh - - -ec - - nats reply --echo echo & pid="$!"; sleep 1; nats request echo hi > /tmp/resp; - kill "$pid"; wait; grep -qF hi /tmp/resp - command: - - sh - - -ec - - | - work_dir="$(pwd)" - mkdir -p "$XDG_CONFIG_HOME/nats" - cd "$XDG_CONFIG_HOME/nats" - if ! [ -s context ]; then - ln -s /etc/nats-contexts context - fi - if ! [ -f context.txt ]; then - echo -n "default" > context.txt - fi - cd "$work_dir" - exec /entrypoint.sh "$@" - - -- - image: natsio/nats-box:0.14.3 - name: nats-box - volumeMounts: - - mountPath: /etc/nats-contexts - name: contexts - enableServiceLinks: false - restartPolicy: Never - volumes: - - name: contexts - secret: - secretName: nats-box-contexts diff --git a/deploy/k8s/kustomize/deploy/base/charts-rendered/wadm.yaml b/deploy/k8s/kustomize/deploy/base/charts-rendered/wadm.yaml deleted file mode 100644 index dcb8d3b..0000000 --- a/deploy/k8s/kustomize/deploy/base/charts-rendered/wadm.yaml +++ /dev/null @@ -1,49 +0,0 @@ ---- -# Source: wadm/templates/deployment.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: wadm - labels: - helm.sh/chart: wadm-0.2.3 - app.kubernetes.io/name: wadm - app.kubernetes.io/instance: wadm - app.kubernetes.io/version: "v0.12.2" - app.kubernetes.io/managed-by: Helm -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: wadm - app.kubernetes.io/instance: wadm - template: - metadata: - labels: - helm.sh/chart: wadm-0.2.3 - app.kubernetes.io/name: wadm - app.kubernetes.io/instance: wadm - app.kubernetes.io/version: "v0.12.2" - app.kubernetes.io/managed-by: Helm - spec: - securityContext: - {} - containers: - - name: wadm - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - runAsGroup: 1000 - runAsNonRoot: true - runAsUser: 1000 - seccompProfile: - type: RuntimeDefault - image: "ghcr.io/wasmcloud/wadm:v0.13.0" - imagePullPolicy: IfNotPresent - env: - - name: WADM_NATS_SERVER - value: "nats.default.svc.cluster.local:4222" - - resources: - {} diff --git a/deploy/k8s/kustomize/deploy/base/charts-rendered/wasmcloud-operator.yaml b/deploy/k8s/kustomize/deploy/base/charts-rendered/wasmcloud-operator.yaml deleted file mode 100644 index 129a104..0000000 --- a/deploy/k8s/kustomize/deploy/base/charts-rendered/wasmcloud-operator.yaml +++ /dev/null @@ -1,235 +0,0 @@ ---- -# Source: wasmcloud-operator/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: wasmcloud-operator - labels: - helm.sh/chart: wasmcloud-operator-0.1.5 - app.kubernetes.io/name: wasmcloud-operator - app.kubernetes.io/instance: wasmcloud-operator - app.kubernetes.io/version: "0.4.0" - app.kubernetes.io/managed-by: Helm -automountServiceAccountToken: true ---- -# Source: wasmcloud-operator/templates/cluster-role.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: wasmcloud-operator - labels: - helm.sh/chart: wasmcloud-operator-0.1.5 - app.kubernetes.io/name: wasmcloud-operator - app.kubernetes.io/instance: wasmcloud-operator - app.kubernetes.io/version: "0.4.0" - app.kubernetes.io/managed-by: Helm -rules: - - apiGroups: - - "" - resources: - - secrets - - services - - configmaps - - serviceaccounts - - pods - verbs: - - get - - list - - watch - - create - - delete - - patch - - update - - apiGroups: - - apps - resources: - - deployments - - daemonsets - verbs: - - get - - list - - watch - - create - - delete - - patch - - update - - apiGroups: - - rbac.authorization.k8s.io - resources: - - rolebindings - - roles - verbs: - - get - - list - - watch - - create - - delete - - patch - - apiGroups: - - apiextensions.k8s.io - resources: - - customresourcedefinitions - verbs: - - get - - list - - watch - - create - - delete - - patch - - apiGroups: - - apiregistration.k8s.io - resources: - - apiservices - verbs: - - create - - delete - - get - - list - - patch - - update - - apiGroups: - - discovery.k8s.io - resources: - - endpointslices - verbs: - - create - - delete - - get - - list - - patch - - update - - apiGroups: - - k8s.wasmcloud.dev - resources: - - wasmcloudhostconfigs - - wasmcloudhostconfigs/status - verbs: - - "*" ---- -# Source: wasmcloud-operator/templates/cluster-role.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: wasmcloud-operator - labels: - helm.sh/chart: wasmcloud-operator-0.1.5 - app.kubernetes.io/name: wasmcloud-operator - app.kubernetes.io/instance: wasmcloud-operator - app.kubernetes.io/version: "0.4.0" - app.kubernetes.io/managed-by: Helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: wasmcloud-operator -subjects: - - apiGroup: "" - kind: ServiceAccount - name: wasmcloud-operator - namespace: default ---- -# Source: wasmcloud-operator/templates/cluster-role.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: wasmcloud-operator-delegator -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:auth-delegator -subjects: - - apiGroup: "" - kind: ServiceAccount - name: wasmcloud-operator - namespace: default ---- -# Source: wasmcloud-operator/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: wasmcloud-operator - labels: - helm.sh/chart: wasmcloud-operator-0.1.5 - app.kubernetes.io/name: wasmcloud-operator - app.kubernetes.io/instance: wasmcloud-operator - app.kubernetes.io/version: "0.4.0" - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - ports: - - port: 8443 - targetPort: https - protocol: TCP - name: https - selector: - app.kubernetes.io/name: wasmcloud-operator - app.kubernetes.io/instance: wasmcloud-operator ---- -# Source: wasmcloud-operator/templates/deployment.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: wasmcloud-operator - labels: - helm.sh/chart: wasmcloud-operator-0.1.5 - app.kubernetes.io/name: wasmcloud-operator - app.kubernetes.io/instance: wasmcloud-operator - app.kubernetes.io/version: "0.4.0" - app.kubernetes.io/managed-by: Helm -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: wasmcloud-operator - app.kubernetes.io/instance: wasmcloud-operator - template: - metadata: - labels: - helm.sh/chart: wasmcloud-operator-0.1.5 - app.kubernetes.io/name: wasmcloud-operator - app.kubernetes.io/instance: wasmcloud-operator - app.kubernetes.io/version: "0.4.0" - app.kubernetes.io/managed-by: Helm - spec: - serviceAccountName: wasmcloud-operator - securityContext: - {} - containers: - - name: wasmcloud-operator - securityContext: - {} - image: "ghcr.io/wasmcloud/wasmcloud-operator:0.4.0" - imagePullPolicy: IfNotPresent - env: - - name: RUST_LOG - value: info,async_nats=error - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - ports: - - name: https - containerPort: 8443 - protocol: TCP - resources: - {} ---- -# Source: wasmcloud-operator/templates/tests/test-connection.yaml -apiVersion: v1 -kind: Pod -metadata: - name: "wasmcloud-operator-test-connection" - labels: - helm.sh/chart: wasmcloud-operator-0.1.5 - app.kubernetes.io/name: wasmcloud-operator - app.kubernetes.io/instance: wasmcloud-operator - app.kubernetes.io/version: "0.4.0" - app.kubernetes.io/managed-by: Helm - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: alpine - command: ['wget'] - args: ['--no-check-certificate', 'https://wasmcloud-operator:8443/apis/core.oam.dev/v1beta1'] - restartPolicy: Never diff --git a/deploy/k8s/kustomize/deploy/base/charts-rendered/wasmcloud-platform.yaml b/deploy/k8s/kustomize/deploy/base/charts-rendered/wasmcloud-platform.yaml new file mode 100644 index 0000000..00b6878 --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts-rendered/wasmcloud-platform.yaml @@ -0,0 +1,680 @@ +--- +# Source: wasmcloud-platform/charts/nats/templates/pod-disruption-budget.yaml +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + labels: + app.kubernetes.io/component: nats + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: nats + app.kubernetes.io/version: 2.10.19 + helm.sh/chart: nats-1.2.3 + name: nats +spec: + maxUnavailable: 1 + selector: + matchLabels: + app.kubernetes.io/component: nats + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/name: nats +--- +# Source: wasmcloud-platform/charts/operator/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: wasmcloud-operator + labels: + helm.sh/chart: operator-0.1.5 + app.kubernetes.io/name: wasmcloud-operator + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/version: "0.4.0" + app.kubernetes.io/managed-by: Helm +automountServiceAccountToken: true +--- +# Source: wasmcloud-platform/charts/nats/templates/nats-box/contexts-secret.yaml +apiVersion: v1 +kind: Secret +metadata: + labels: + app.kubernetes.io/component: nats-box + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: nats + app.kubernetes.io/version: 2.10.19 + helm.sh/chart: nats-1.2.3 + name: nats-box-contexts +stringData: + default.json: | + { + "url": "nats://nats" + } +type: Opaque +--- +# Source: wasmcloud-platform/charts/nats/templates/config-map.yaml +apiVersion: v1 +data: + nats.conf: | + { + "cluster": { + "name": "nats", + "no_advertise": true, + "port": 6222, + "routes": [ + "nats://nats-0.nats-headless:6222", + "nats://nats-1.nats-headless:6222", + "nats://nats-2.nats-headless:6222" + ] + }, + "http_port": 8222, + "jetstream": { + "domain": "default", + "max_file_store": 10Gi, + "max_memory_store": 0, + "store_dir": "/data" + }, + "lame_duck_duration": "30s", + "lame_duck_grace_period": "10s", + "leafnodes": { + "no_advertise": true, + "port": 7422 + }, + "pid_file": "/var/run/nats/nats.pid", + "port": 4222, + "server_name": $SERVER_NAME, + "websocket": { + "no_tls": true, + "port": 4223 + } + } +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/component: nats + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: nats + app.kubernetes.io/version: 2.10.19 + helm.sh/chart: nats-1.2.3 + name: nats-config +--- +# Source: wasmcloud-platform/charts/operator/templates/cluster-role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: wasmcloud-operator + labels: + helm.sh/chart: operator-0.1.5 + app.kubernetes.io/name: wasmcloud-operator + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/version: "0.4.0" + app.kubernetes.io/managed-by: Helm +rules: + - apiGroups: + - "" + resources: + - secrets + - services + - configmaps + - serviceaccounts + - pods + verbs: + - get + - list + - watch + - create + - delete + - patch + - update + - apiGroups: + - apps + resources: + - deployments + - daemonsets + verbs: + - get + - list + - watch + - create + - delete + - patch + - update + - apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + - roles + verbs: + - get + - list + - watch + - create + - delete + - patch + - apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list + - watch + - create + - delete + - patch + - apiGroups: + - apiregistration.k8s.io + resources: + - apiservices + verbs: + - create + - delete + - get + - list + - patch + - update + - apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - create + - delete + - get + - list + - patch + - update + - apiGroups: + - k8s.wasmcloud.dev + resources: + - wasmcloudhostconfigs + - wasmcloudhostconfigs/status + verbs: + - "*" +--- +# Source: wasmcloud-platform/charts/operator/templates/cluster-role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: wasmcloud-operator + labels: + helm.sh/chart: operator-0.1.5 + app.kubernetes.io/name: wasmcloud-operator + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/version: "0.4.0" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: wasmcloud-operator +subjects: + - apiGroup: "" + kind: ServiceAccount + name: wasmcloud-operator + namespace: default +--- +# Source: wasmcloud-platform/charts/operator/templates/cluster-role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: wasmcloud-operator-delegator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:auth-delegator +subjects: + - apiGroup: "" + kind: ServiceAccount + name: wasmcloud-operator + namespace: default +--- +# Source: wasmcloud-platform/charts/nats/templates/headless-service.yaml +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: nats + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: nats + app.kubernetes.io/version: 2.10.19 + helm.sh/chart: nats-1.2.3 + name: nats-headless +spec: + clusterIP: None + ports: + - appProtocol: tcp + name: nats + port: 4222 + targetPort: nats + - appProtocol: tcp + name: leafnodes + port: 7422 + targetPort: leafnodes + - appProtocol: http + name: websocket + port: 4223 + targetPort: websocket + - appProtocol: tcp + name: cluster + port: 6222 + targetPort: cluster + - appProtocol: http + name: monitor + port: 8222 + targetPort: monitor + publishNotReadyAddresses: true + selector: + app.kubernetes.io/component: nats + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/name: nats +--- +# Source: wasmcloud-platform/charts/nats/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: nats + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: nats + app.kubernetes.io/version: 2.10.19 + helm.sh/chart: nats-1.2.3 + name: nats +spec: + ports: + - appProtocol: tcp + name: nats + port: 4222 + targetPort: nats + - appProtocol: tcp + name: leafnodes + port: 7422 + targetPort: leafnodes + - appProtocol: http + name: websocket + port: 4223 + targetPort: websocket + selector: + app.kubernetes.io/component: nats + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/name: nats +--- +# Source: wasmcloud-platform/charts/operator/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: wasmcloud-operator + labels: + helm.sh/chart: operator-0.1.5 + app.kubernetes.io/name: wasmcloud-operator + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/version: "0.4.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 8443 + targetPort: https + protocol: TCP + name: https + selector: + app.kubernetes.io/name: wasmcloud-operator + app.kubernetes.io/instance: wasmcloud-platform +--- +# Source: wasmcloud-platform/charts/nats/templates/nats-box/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: nats-box + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: nats + app.kubernetes.io/version: 2.10.19 + helm.sh/chart: nats-1.2.3 + name: nats-box +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/component: nats-box + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/name: nats + template: + metadata: + labels: + app.kubernetes.io/component: nats-box + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: nats + app.kubernetes.io/version: 2.10.19 + helm.sh/chart: nats-1.2.3 + spec: + containers: + - args: + - sh + - -ec + - trap true INT TERM; sleep infinity & wait + command: + - sh + - -ec + - | + work_dir="$(pwd)" + mkdir -p "$XDG_CONFIG_HOME/nats" + cd "$XDG_CONFIG_HOME/nats" + if ! [ -s context ]; then + ln -s /etc/nats-contexts context + fi + if ! [ -f context.txt ]; then + echo -n "default" > context.txt + fi + cd "$work_dir" + exec /entrypoint.sh "$@" + - -- + image: natsio/nats-box:0.14.4 + name: nats-box + volumeMounts: + - mountPath: /etc/nats-contexts + name: contexts + enableServiceLinks: false + volumes: + - name: contexts + secret: + secretName: nats-box-contexts +--- +# Source: wasmcloud-platform/charts/operator/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wasmcloud-operator + labels: + helm.sh/chart: operator-0.1.5 + app.kubernetes.io/name: wasmcloud-operator + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/version: "0.4.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: wasmcloud-operator + app.kubernetes.io/instance: wasmcloud-platform + template: + metadata: + labels: + helm.sh/chart: operator-0.1.5 + app.kubernetes.io/name: wasmcloud-operator + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/version: "0.4.0" + app.kubernetes.io/managed-by: Helm + spec: + serviceAccountName: wasmcloud-operator + securityContext: + {} + containers: + - name: operator + securityContext: + {} + image: "ghcr.io/wasmcloud/wasmcloud-operator:0.4.0" + imagePullPolicy: IfNotPresent + env: + - name: RUST_LOG + value: info,async_nats=error + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + ports: + - name: https + containerPort: 8443 + protocol: TCP + resources: + {} +--- +# Source: wasmcloud-platform/charts/wadm/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wadm + labels: + helm.sh/chart: wadm-0.2.7 + app.kubernetes.io/name: wadm + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/version: "v0.14.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: + selector: + matchLabels: + app.kubernetes.io/name: wadm + app.kubernetes.io/instance: wasmcloud-platform + template: + metadata: + labels: + helm.sh/chart: wadm-0.2.7 + app.kubernetes.io/name: wadm + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/version: "v0.14.0" + app.kubernetes.io/managed-by: Helm + spec: + securityContext: + {} + containers: + - name: wadm + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + runAsGroup: 1000 + runAsNonRoot: true + runAsUser: 1000 + seccompProfile: + type: RuntimeDefault + image: "ghcr.io/wasmcloud/wadm:v0.15.0" + imagePullPolicy: IfNotPresent + env: + - name: WADM_NATS_SERVER + value: "nats://nats-headless.default.svc.cluster.local" + + resources: + {} +--- +# Source: wasmcloud-platform/charts/nats/templates/stateful-set.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + labels: + app.kubernetes.io/component: nats + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: nats + app.kubernetes.io/version: 2.10.19 + helm.sh/chart: nats-1.2.3 + name: nats +spec: + podManagementPolicy: Parallel + replicas: 3 + selector: + matchLabels: + app.kubernetes.io/component: nats + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/name: nats + serviceName: nats-headless + template: + metadata: + annotations: + checksum/config: 0fe5219af2a91eb9dbfd19781918f6b7832f8bd7ca03af2adef83e5ce3121c5b + labels: + app.kubernetes.io/component: nats + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: nats + app.kubernetes.io/version: 2.10.19 + helm.sh/chart: nats-1.2.3 + spec: + containers: + - args: + - --config + - /etc/nats-config/nats.conf + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: SERVER_NAME + value: $(POD_NAME) + image: nats:2.10.19-alpine + lifecycle: + preStop: + exec: + command: + - nats-server + - -sl=ldm=/var/run/nats/nats.pid + livenessProbe: + failureThreshold: 3 + httpGet: + path: /healthz?js-enabled-only=true + port: monitor + initialDelaySeconds: 10 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 5 + name: nats + ports: + - containerPort: 4222 + name: nats + - containerPort: 7422 + name: leafnodes + - containerPort: 4223 + name: websocket + - containerPort: 6222 + name: cluster + - containerPort: 8222 + name: monitor + readinessProbe: + failureThreshold: 3 + httpGet: + path: /healthz?js-server-only=true + port: monitor + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + startupProbe: + failureThreshold: 90 + httpGet: + path: /healthz + port: monitor + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + volumeMounts: + - mountPath: /etc/nats-config + name: config + - mountPath: /var/run/nats + name: pid + - mountPath: /data + name: nats-js + - args: + - -pid + - /var/run/nats/nats.pid + - -config + - /etc/nats-config/nats.conf + image: natsio/nats-server-config-reloader:0.15.1 + name: reloader + volumeMounts: + - mountPath: /var/run/nats + name: pid + - mountPath: /etc/nats-config + name: config + enableServiceLinks: false + shareProcessNamespace: true + volumes: + - configMap: + name: nats-config + name: config + - emptyDir: {} + name: pid + volumeClaimTemplates: + - metadata: + name: nats-js + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi +--- +# Source: wasmcloud-platform/charts/nats/templates/tests/request-reply.yaml +apiVersion: v1 +kind: Pod +metadata: + annotations: + helm.sh/hook: test + helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded + labels: + app.kubernetes.io/component: test-request-reply + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: nats + app.kubernetes.io/version: 2.10.19 + helm.sh/chart: nats-1.2.3 + name: nats-test-request-reply +spec: + containers: + - args: + - sh + - -ec + - nats reply --echo echo & pid="$!"; sleep 1; nats request echo hi > /tmp/resp; + kill "$pid"; wait; grep -qF hi /tmp/resp + command: + - sh + - -ec + - | + work_dir="$(pwd)" + mkdir -p "$XDG_CONFIG_HOME/nats" + cd "$XDG_CONFIG_HOME/nats" + if ! [ -s context ]; then + ln -s /etc/nats-contexts context + fi + if ! [ -f context.txt ]; then + echo -n "default" > context.txt + fi + cd "$work_dir" + exec /entrypoint.sh "$@" + - -- + image: natsio/nats-box:0.14.4 + name: nats-box + volumeMounts: + - mountPath: /etc/nats-contexts + name: contexts + enableServiceLinks: false + restartPolicy: Never + volumes: + - name: contexts + secret: + secretName: nats-box-contexts +--- +# Source: wasmcloud-platform/charts/operator/templates/tests/test-connection.yaml +apiVersion: v1 +kind: Pod +metadata: + name: "wasmcloud-operator-test-connection" + labels: + helm.sh/chart: operator-0.1.5 + app.kubernetes.io/name: wasmcloud-operator + app.kubernetes.io/instance: wasmcloud-platform + app.kubernetes.io/version: "0.4.0" + app.kubernetes.io/managed-by: Helm + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: alpine + command: ['wget'] + args: ['--no-check-certificate', 'https://wasmcloud-operator:8443/apis/core.oam.dev/v1beta1'] + restartPolicy: Never diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/.helmignore b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/.helmignore new file mode 100644 index 0000000..da79461 --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/.helmignore @@ -0,0 +1,28 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# Ignore chart-testing config +# ct.yaml +# Ignore artifacthub.io config file +artifacthub-repo.yml +# */NOTES.txt \ No newline at end of file diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/Chart.lock b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/Chart.lock new file mode 100644 index 0000000..8ccfbc4 --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/Chart.lock @@ -0,0 +1,15 @@ +dependencies: +- name: nats + repository: https://nats-io.github.io/k8s/helm/charts/ + version: 1.2.3 +- name: wadm + repository: oci://ghcr.io/wasmcloud/charts + version: 0.2.7 +- name: wasmcloud-operator + repository: oci://ghcr.io/wasmcloud/charts + version: 0.1.5 +- name: wasmcloud-host + repository: oci://ghcr.io/wasmcloud/charts + version: 0.8.4 +digest: sha256:e0864d6f9816e240304aca25148281144bc0c281e6b3e55b9aa7847cdf09c0e4 +generated: "2024-10-14T15:00:13.010274266Z" diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/Chart.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/Chart.yaml new file mode 100644 index 0000000..8ec4215 --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/Chart.yaml @@ -0,0 +1,51 @@ +annotations: + license: Apache-2.0 +apiVersion: v2 +appVersion: 1.2.1 +dependencies: +- condition: nats.enabled + name: nats + repository: https://nats-io.github.io/k8s/helm/charts/ + tags: + - nats-cluster + version: 1.2.3 +- condition: wadm.enabled + name: wadm + repository: oci://ghcr.io/wasmcloud/charts + tags: + - wadm + version: 0.2.7 +- alias: operator + condition: operator.enabled + name: wasmcloud-operator + repository: oci://ghcr.io/wasmcloud/charts + tags: + - wasmcloud-operator + version: 0.1.5 +- alias: host + condition: host.enabled + name: wasmcloud-host + repository: oci://ghcr.io/wasmcloud/charts + tags: + - wasmcloud-host + version: 0.8.4 +description: wasmCloud Platform Helm Chart provides a turnkey solution, for running + WebAssembly applications on Kubernetes. +home: https://github.com/wasmCloud/wasmcloud +icon: https://github.com/wasmCloud/wasmCloud/blob/main/brand/icon/green/wasmCloud.icon-green.svg +keywords: +- wasmcloud +- wasi +- webassembly +- wadm +- nats +- cncf +kubeVersion: '>=1.24.0' +name: wasmcloud-platform +sources: +- https://github.com/wasmCloud/wasmCloud +- https://github.com/wasmCloud/wadm +- https://github.com/nats-io/nats-server +- https://github.com/wasmCloud/wasmcloud-operator +type: application +version: 0.1.0 diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/README.md b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/README.md new file mode 100644 index 0000000..b88bcd5 --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/README.md @@ -0,0 +1,111 @@ +# wasmcloud-platform + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.2.1](https://img.shields.io/badge/AppVersion-1.2.1-informational?style=flat-square) + +[wasmCloud](https://wasmcloud.com/docs/intro) is an open source project from the Cloud Native Computing Foundation (CNCF) that enables teams to build polyglot applications composed of reusable Wasm components and run them—resiliently and efficiently—across any cloud, Kubernetes, datacenter, or edge. + +The wasmCloud Platform Helm Chart provides a turnkey solution, for running WebAssembly applications on Kubernetes. + +## Prerequisites + +* Kubernetes: `>=1.24.0` + +* Helm: `>=3.8.0` + +* If installing the NATS server - a StatefulSet - the means of provisioing PVCs (e.g. a CSI driver) + +## Getting Started + +The wasmCloud platform is comprised of three components, a NATS cluster as the backbone of its [lattice](https://wasmcloud.com/docs/concepts/lattice), [Wadm](https://wasmcloud.com/docs/ecosystem/wadm) for WebAssembly applications lifecycle management, and wasmCloud [host](https://wasmcloud.com/docs/concepts/hosts), which can be provided either by [wasmcloud-operator](https://github.com/wasmcloud/wasmcloud-operator) - if preferring managed hosts - or [wasmcloud-host](https://github.com/wasmCloud/wasmCloud/tree/main/charts/wasmcloud-host). + +To take full advantage of the chart features, it's best to use wasmcloud-operator, and install the chart in two steps. + +### Deploy wasmCloud Platform + +```bash +# By default, the chart installs NATS, Wadm, and wasmCloud Operator subcharts +helm upgrade --install \ + wasmcloud-platform \ + --values https://raw.githubusercontent.com/wasmCloud/wasmcloud/main/charts/wasmcloud-platform/values.yaml \ + oci://ghcr.io/wasmcloud/charts/wasmcloud-platform \ + --dependency-update +``` + +Wait for all components to install and wadm-nats communications to establish: + +```bash +kubectl rollout status deploy,sts -l app.kubernetes.io/name=nats +kubectl wait --for=condition=available --timeout=600s deploy -l app.kubernetes.io/name=wadm +kubectl wait --for=condition=available --timeout=600s deploy -l app.kubernetes.io/name=wasmcloud-operator +``` + +### Create a wasmCloud Host + +```bash +helm upgrade --install \ + wasmcloud-platform \ + --values https://raw.githubusercontent.com/wasmCloud/wasmcloud/main/charts/wasmcloud-platform/values.yaml \ + oci://ghcr.io/wasmcloud/charts/wasmcloud-platform \ + --dependency-update \ + --set "hostConfig.enabled=true" +``` + +Check the status of the newly created host: + +```bash +kubectl describe wasmcloudhostconfig wasmcloud-host +``` + +To validate the wasmCloud platform's readiness for WebAssembly applications, you can follow the wasmCloud documentation to [run](https://wasmcloud.com/docs/deployment/k8s/kind#run-a-webassembly-component-on-kubernetes) a sample WebAssembly application on the host, and [test](https://wasmcloud.com/docs/deployment/k8s/kind#test-the-application) it. + +## Values + +| Key | Type | Default | Description | +| --------------------------------------------------- | ------ | -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| nats.enabled | bool | `true` | Whether to install the nats subchart | +| ***nats chart configuration values*** | chart | | For the most up to date information, please see the official NATS.io helm chart on ArtifactHUB: | +| wadm.enabled | bool | `true` | Whether to install the wadm subchart | +| ***wadm chart configuration values*** | chart | | For the most up to date information, please see the Wadm helm chart on GitHub: Source: | +| operator.enabled | bool | `true` | Whether to install the wasmcloud-operator subchart | +| ***wasmcloud-operator chart configuration values*** | chart | | For the most up to date information, please see the wasmcloud-operator helm chart on GitHub: | +| host.enabled | bool | `false` | Whether to install the wasmcloud-host subchart | +| ***wasmcloud-host chart configuration values*** | chart | | For the most up to date information, please see the wasmcloud-host helm chart on GitHub: | +| hostConfig.enabled | bool | `false` | Whether to use the wasmCloud host configuration custom resource. This requires the WasmCloudHostConfig CRD, which is part of wasmcloud-operator. | +| hostConfig.name | string | `"wasmcloud-host"` | Name of the wasmCloud host configuration resource. | +| hostConfig.namespace | string | `"default"` | Namespace to deploy the wasmCloud host to. | +| hostConfig.hostReplicas | int | `1` | Number of hosts (pods). | +| hostConfig.lattice | string | `"default"` | The lattice to connect the hosts to. | +| hostConfig.hostLabels | object | `{}` | Additional labels to apply to the host other than the defaults set in the controller. | +| hostConfig.version | string | `"latest"` | Which wasmCloud version to use. | +| hostConfig.image | string | `""` | If not provided, the image corresponding to the `version` will be used. | +| hostConfig.natsLeafImage | string | `""` | If not provided, the default upstream image will be used. | +| hostConfig.secretName | string | `""` | The name of a secret containing a set of NATS credentials under 'nats.creds' key. | +| hostConfig.natsCredentialsFile | string | `""` | The file containing the NATS access credentials; if provided, the file must be placed within the chart's main directory or one of its subdirectories. | +| hostConfig.enableStructuredLogging | bool | `false` | Enable structured logging for host logs. | +| hostConfig.registryCredentialsSecret | string | `""` | The name of a secret containing the registry credentials. | +| hostConfig.registryCredentialsFile | string | `""` | The file containing the login credentials for the private registry where wasmCloud host images are stored. | +| hostConfig.controlTopicPrefix | string | `"wasmbus.ctl"` | The control topic prefix to use for the host. | +| hostConfig.leafNodeDomain | string | `"leaf"` | The leaf node domain to use for the NATS sidecar. | +| hostConfig.configServiceEnabled | bool | `false` | Makes wasmCloud host issue requests to a config service on startup. | +| hostConfig.logLevel | string | `"INFO"` | The log level to use for the host. | +| hostConfig.natsAddress | string | `"nats://nats-headless.default.svc.cluster.local"` | The address of the NATS server to connect to. | +| hostConfig.allowLatest | bool | `false` | Allow the host to deploy using the latest tag on OCI components or providers. | +| hostConfig.allowedInsecure | list | `[]` | Allow the host to pull artifacts from OCI registries insecurely. | +| hostConfig.policyService.topic | string | `""` | If provided, enables policy checks on start actions and component invocations. | +| hostConfig.policyService.changesTopic | string | `""` | If provided, allows the host to subscribe to updates on past policy decisions. Requires 'topic' to be set. | +| hostConfig.policyService.timeoutMs | int | `1000` | If provided, allows setting a custom timeout for requesting policy decisions; defaults to 1000. Requires 'topic' to be set. | +| hostConfig.observability.enable | bool | `true` | Enables all signals (logs/metrics/traces) at once. Set it to 'false' and enable each signal individually in case you don't need all of them. | +| hostConfig.observability.endpoint | string | `"otel-collector.svc"` | The OpenTelemetry collector endpoint configuration. | +| hostConfig.observability.protocol | string | `"http"` | The OpenTelemetry collector protocol (http, grpc). | +| hostConfig.observability.logs.enable | bool | `false` | Use if setting observability signals individually. | +| hostConfig.observability.logs.endpoint | string | `"logs-specific-otel-collector.svc"` | | +| hostConfig.observability.metrics.enable | object | `false` | Use if setting observability signals individually. | +| hostConfig.observability.metrics.endpoint | string | `"metrics-specific-otel-collector.svc"` | | +| hostConfig.observability.traces.enable | object | `false` | Use if setting observability signals individually. | +| hostConfig.observability.traces.endpoint | string | `"traces-specific-otel-collector.svc"` | | +| hostConfig.secretsTopicPrefix | string | `"wasmcloud.secrets"` | For more context, please see: | +| hostConfig.maxLinearMemoryBytes | int | `20000000` | The maximum amount of memory bytes that a component can allocate. | +| hostConfig.schedulingOptions.daemonset | bool | `false` | Whether to run the wasmCloud host as a DaemonSet | +| hostConfig.schedulingOptions.resources | object | `{"nats":{},"wasmCloudHost":{}}` | See for valid values | +| hostConfig.schedulingOptions.podTemplateAdditions | object | `{"spec":{"nodeSelector":{"kubernetes.io/os":"linux"}}}` | Note that you *cannot* set the `containers` field here as it is managed by the controller. | + diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/.helmignore b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/.helmignore similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/.helmignore rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/.helmignore diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/Chart.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/Chart.yaml similarity index 90% rename from deploy/k8s/kustomize/deploy/base/charts/nats/Chart.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/Chart.yaml index 75d1685..2cc8de1 100644 --- a/deploy/k8s/kustomize/deploy/base/charts/nats/Chart.yaml +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 2.10.18 +appVersion: 2.10.19 description: A Helm chart for the NATS.io High Speed Cloud Native Distributed Communications Technology. home: http://github.com/nats-io/k8s @@ -13,4 +13,4 @@ maintainers: name: The NATS Authors url: https://github.com/nats-io name: nats -version: 1.2.2 +version: 1.2.3 diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/README.md b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/README.md similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/README.md rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/README.md diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/UPGRADING.md b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/UPGRADING.md similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/UPGRADING.md rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/UPGRADING.md diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/config-map.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config-map.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/config-map.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config-map.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/config/cluster.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/cluster.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/config/cluster.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/cluster.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/config/config.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/config.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/config/config.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/config.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/config/gateway.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/gateway.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/config/gateway.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/gateway.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/config/jetstream.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/jetstream.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/config/jetstream.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/jetstream.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/config/leafnodes.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/leafnodes.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/config/leafnodes.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/leafnodes.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/config/mqtt.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/mqtt.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/config/mqtt.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/mqtt.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/config/protocol.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/protocol.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/config/protocol.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/protocol.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/config/resolver.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/resolver.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/config/resolver.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/resolver.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/config/tls.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/tls.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/config/tls.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/tls.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/config/websocket.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/websocket.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/config/websocket.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/config/websocket.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/headless-service.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/headless-service.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/headless-service.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/headless-service.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/ingress.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/ingress.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/ingress.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/ingress.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/nats-box/contents-secret.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/nats-box/contents-secret.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/nats-box/contents-secret.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/nats-box/contents-secret.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/nats-box/contexts-secret/context.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/nats-box/contexts-secret/context.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/nats-box/contexts-secret/context.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/nats-box/contexts-secret/context.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/nats-box/contexts-secret/contexts-secret.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/nats-box/contexts-secret/contexts-secret.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/nats-box/contexts-secret/contexts-secret.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/nats-box/contexts-secret/contexts-secret.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/nats-box/deployment/container.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/nats-box/deployment/container.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/nats-box/deployment/container.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/nats-box/deployment/container.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/nats-box/deployment/deployment.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/nats-box/deployment/deployment.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/nats-box/deployment/deployment.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/nats-box/deployment/deployment.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/nats-box/deployment/pod-template.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/nats-box/deployment/pod-template.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/nats-box/deployment/pod-template.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/nats-box/deployment/pod-template.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/nats-box/service-account.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/nats-box/service-account.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/nats-box/service-account.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/nats-box/service-account.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/pod-disruption-budget.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/pod-disruption-budget.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/pod-disruption-budget.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/pod-disruption-budget.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/pod-monitor.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/pod-monitor.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/pod-monitor.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/pod-monitor.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/service-account.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/service-account.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/service-account.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/service-account.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/service.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/service.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/service.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/service.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/stateful-set/jetstream-pvc.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/stateful-set/jetstream-pvc.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/stateful-set/jetstream-pvc.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/stateful-set/jetstream-pvc.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/stateful-set/nats-container.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/stateful-set/nats-container.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/stateful-set/nats-container.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/stateful-set/nats-container.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/stateful-set/pod-template.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/stateful-set/pod-template.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/stateful-set/pod-template.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/stateful-set/pod-template.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/stateful-set/prom-exporter-container.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/stateful-set/prom-exporter-container.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/stateful-set/prom-exporter-container.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/stateful-set/prom-exporter-container.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/stateful-set/reloader-container.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/stateful-set/reloader-container.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/stateful-set/reloader-container.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/stateful-set/reloader-container.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/stateful-set/resolver-pvc.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/stateful-set/resolver-pvc.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/stateful-set/resolver-pvc.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/stateful-set/resolver-pvc.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/files/stateful-set/stateful-set.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/stateful-set/stateful-set.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/files/stateful-set/stateful-set.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/files/stateful-set/stateful-set.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/_helpers.tpl b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/_helpers.tpl similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/_helpers.tpl rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/_helpers.tpl diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/_jsonpatch.tpl b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/_jsonpatch.tpl similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/_jsonpatch.tpl rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/_jsonpatch.tpl diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/_toPrettyRawJson.tpl b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/_toPrettyRawJson.tpl similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/_toPrettyRawJson.tpl rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/_toPrettyRawJson.tpl diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/_tplYaml.tpl b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/_tplYaml.tpl similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/_tplYaml.tpl rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/_tplYaml.tpl diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/config-map.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/config-map.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/config-map.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/config-map.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/extra-resources.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/extra-resources.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/extra-resources.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/extra-resources.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/headless-service.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/headless-service.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/headless-service.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/headless-service.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/ingress.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/ingress.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/ingress.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/ingress.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/nats-box/contents-secret.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/nats-box/contents-secret.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/nats-box/contents-secret.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/nats-box/contents-secret.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/nats-box/contexts-secret.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/nats-box/contexts-secret.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/nats-box/contexts-secret.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/nats-box/contexts-secret.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/nats-box/deployment.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/nats-box/deployment.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/nats-box/deployment.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/nats-box/deployment.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/nats-box/service-account.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/nats-box/service-account.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/nats-box/service-account.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/nats-box/service-account.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/pod-disruption-budget.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/pod-disruption-budget.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/pod-disruption-budget.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/pod-disruption-budget.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/pod-monitor.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/pod-monitor.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/pod-monitor.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/pod-monitor.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/service-account.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/service-account.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/service-account.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/service-account.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/service.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/service.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/service.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/service.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/stateful-set.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/stateful-set.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/stateful-set.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/stateful-set.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/templates/tests/request-reply.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/tests/request-reply.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/nats/templates/tests/request-reply.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/templates/tests/request-reply.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/nats/values.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/values.yaml similarity index 99% rename from deploy/k8s/kustomize/deploy/base/charts/nats/values.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/values.yaml index 8b612ed..fd296dc 100644 --- a/deploy/k8s/kustomize/deploy/base/charts/nats/values.yaml +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/nats/values.yaml @@ -312,7 +312,7 @@ config: container: image: repository: nats - tag: 2.10.18-alpine + tag: 2.10.19-alpine pullPolicy: registry: @@ -353,7 +353,7 @@ reloader: enabled: true image: repository: natsio/nats-server-config-reloader - tag: 0.15.0 + tag: 0.15.1 pullPolicy: registry: @@ -564,7 +564,7 @@ natsBox: container: image: repository: natsio/nats-box - tag: 0.14.3 + tag: 0.14.4 pullPolicy: registry: diff --git a/deploy/k8s/kustomize/deploy/base/charts/wadm/Chart.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/Chart.yaml similarity index 74% rename from deploy/k8s/kustomize/deploy/base/charts/wadm/Chart.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/Chart.yaml index 7b0d425..9c6e5d4 100644 --- a/deploy/k8s/kustomize/deploy/base/charts/wadm/Chart.yaml +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -appVersion: v0.12.2 +appVersion: v0.14.0 description: A Helm chart for deploying wadm on Kubernetes name: wadm type: application -version: 0.2.3 +version: 0.2.7 diff --git a/deploy/k8s/kustomize/deploy/base/charts/wadm/ct.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/ct.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/wadm/ct.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/ct.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/wadm/templates/NOTES.txt b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/templates/NOTES.txt similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/wadm/templates/NOTES.txt rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/templates/NOTES.txt diff --git a/deploy/k8s/kustomize/deploy/base/charts/wadm/templates/_helpers.tpl b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/templates/_helpers.tpl similarity index 90% rename from deploy/k8s/kustomize/deploy/base/charts/wadm/templates/_helpers.tpl rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/templates/_helpers.tpl index 13b2f79..0294c6b 100644 --- a/deploy/k8s/kustomize/deploy/base/charts/wadm/templates/_helpers.tpl +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/templates/_helpers.tpl @@ -50,6 +50,15 @@ app.kubernetes.io/name: {{ include "wadm.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} +{{- define "wadm.nats.server" -}} +- name: WADM_NATS_SERVER +{{- if .Values.wadm.config.nats.server }} + value: {{ .Values.wadm.config.nats.server | quote }} +{{- else }} + value: nats-headless.{{ .Release.Namespace }}.svc.cluster.local +{{- end }} +{{- end }} + {{- define "wadm.nats.auth" -}} {{- if .Values.wadm.config.nats.creds.secretName -}} - name: WADM_NATS_CREDS_FILE diff --git a/deploy/k8s/kustomize/deploy/base/charts/wadm/templates/deployment.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/templates/deployment.yaml similarity index 96% rename from deploy/k8s/kustomize/deploy/base/charts/wadm/templates/deployment.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/templates/deployment.yaml index 9ea24c4..e0afe4a 100644 --- a/deploy/k8s/kustomize/deploy/base/charts/wadm/templates/deployment.yaml +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/templates/deployment.yaml @@ -5,7 +5,7 @@ metadata: labels: {{- include "wadm.labels" . | nindent 4 }} spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.replicas }} selector: matchLabels: {{- include "wadm.selectorLabels" . | nindent 6 }} @@ -34,8 +34,7 @@ spec: image: "{{ .Values.wadm.image.repository }}:{{ .Values.wadm.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.wadm.image.pullPolicy }} env: - - name: WADM_NATS_SERVER - value: {{ .Values.wadm.config.nats.server | quote }} + {{- include "wadm.nats.server" . | nindent 12 }} {{- include "wadm.nats.auth" . | nindent 12 }} {{- if .Values.wadm.config.nats.tlsCaFile }} - name: WADM_NATS_TLS_CA_FILE diff --git a/deploy/k8s/kustomize/deploy/base/charts/wadm/values.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/values.yaml similarity index 98% rename from deploy/k8s/kustomize/deploy/base/charts/wadm/values.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/values.yaml index 23276bd..9ed514c 100644 --- a/deploy/k8s/kustomize/deploy/base/charts/wadm/values.yaml +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wadm/values.yaml @@ -14,7 +14,7 @@ wadm: hostId: "" logLevel: "" nats: - server: "127.0.0.1:4222" + server: "" jetstreamDomain: "" tlsCaFile: "" creds: diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/.helmignore b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/.helmignore similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/.helmignore rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/.helmignore diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/Chart.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/Chart.yaml new file mode 100644 index 0000000..620c6f4 --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +appVersion: 1.2.0 +description: A Helm chart for deploying wasmCloud hosts on Kubernetes +name: wasmcloud-host +type: application +version: 0.8.4 diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/ct.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/ct.yaml new file mode 100644 index 0000000..dd365c9 --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/ct.yaml @@ -0,0 +1,3 @@ +charts: + - charts/wasmcloud-host +validate-maintainers: false \ No newline at end of file diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/templates/_helpers.tpl b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/templates/_helpers.tpl new file mode 100644 index 0000000..4d11fc5 --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/templates/_helpers.tpl @@ -0,0 +1,82 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "wasmcloud-host.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "wasmcloud-host.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{- define "wasmcloud-host.nats-config-name" -}} +{{- .Release.Name | trunc 51 | trimSuffix "-" }}-nats-leaf-config +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "wasmcloud-host.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "wasmcloud-host.labels" -}} +helm.sh/chart: {{ include "wasmcloud-host.chart" . }} +{{ include "wasmcloud-host.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "wasmcloud-host.selectorLabels" -}} +app.kubernetes.io/name: {{ include "wasmcloud-host.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "wasmcloud-host.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "wasmcloud-host.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{- define "wasmcloud-host.allowed-insecure" -}} +{{- $list := list }} +{{- range .Values.config.allowedInsecure }} +{{- $list = append $list . }} +{{- end }} +{{- join "," $list }} +{{- end }} + +{{- define "wasmcloud-host.nats.address" -}} +{{- if .Values.config.natsAddress }} +url: {{ .Values.config.natsAddress | quote }} +{{- else }} +url: "nats://nats-headless.{{ .Release.Namespace }}.svc.cluster.local" +{{- end }} +{{- end }} \ No newline at end of file diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/templates/configmap.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/templates/configmap.yaml new file mode 100644 index 0000000..8aaa545 --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/templates/configmap.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "wasmcloud-host.nats-config-name" . }} + labels: + {{- include "wasmcloud-host.labels" . | nindent 4 }} +data: + nats.conf: | + jetstream { + domain={{ .Values.config.leafNodeDomain | quote }} + store_dir="/tmp/nats-leaf-jetstream" + } + + listen: "127.0.0.1:4222" + leafnodes { + remotes = [ + { + {{- include "wasmcloud-host.nats.address" . | nindent 14 }} + {{- if .Values.config.natsCredentialsSecret }} + credentials: "/nats/nats.creds" + {{- end }} + }, + ] + } \ No newline at end of file diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/templates/deployment.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/templates/deployment.yaml new file mode 100644 index 0000000..f899559 --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/templates/deployment.yaml @@ -0,0 +1,185 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "wasmcloud-host.fullname" . }} + labels: + {{- include "wasmcloud-host.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicas }} + selector: + matchLabels: + {{- include "wasmcloud-host.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "wasmcloud-host.labels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: wasmcloud-host + command: ["wasmcloud"] + {{- if or (eq .Values.config.observability.enable true) (eq .Values.config.observability.traces.enable true) (eq .Values.config.observability.metrics.enable true) (eq .Values.config.observability.logs.enable true) }} + arg: + {{- if .Values.config.observability.enable }} + - --enable-observability + {{- end }} + {{- if .Values.config.observability.endpoint }} + - --override-observability-endpoint + - {{ .Values.config.observability.endpoint }} + {{- end }} + {{- if .Values.config.observability.protocol }} + - --observability-protocol + - {{ .Values.config.observability.protocol }} + {{- end }} + {{- if .Values.config.observability.traces.enable }} + - --enable-traces + {{ end }} + {{- if .Values.config.observability.traces.endpoint }} + - --override-traces-endpoint + - {{ .Values.config.observability.traces.endpoint }} + {{- end }} + {{- if .Values.config.observability.metrics.enable }} + - --enable-metrics + {{ end }} + {{- if .Values.config.observability.metrics.endpoint }} + - --override-metrics-endpoint + - {{ .Values.config.observability.metrics.endpoint }} + {{- end }} + {{- if .Values.config.observability.logs.enable }} + - --enable-logs + {{ end }} + {{- if .Values.config.observability.logs.endpoint }} + - --override-logs-endpoint + - {{ .Values.config.observability.logs.endpoint }} + {{- end }} + {{- end }} + env: + {{- if .Values.config.enableStructuredLogging }} + - name: WASMCLOUD_STRUCTURED_LOGGING_ENABLED + value: "true" + {{- end }} + - name: WASMCLOUD_LOG_LEVEL + value: {{ .Values.config.logLevel | upper | quote }} + - name: WASMCLOUD_JS_DOMAIN + value: {{ .Values.config.jetstreamDomain | quote }} + - name: WASMCLOUD_LATTICE + value: {{ .Values.config.lattice | quote }} + - name: WASMCLOUD_NATS_HOST + value: "127.0.0.1" + - name: WASMCLOUD_NATS_PORT + value: "4222" + - name: WASMCLOUD_RPC_TIMEOUT_MS + value: "4000" + {{- if .Values.config.controlTopicPrefix }} + - name: WASMCLOUD_CTL_TOPIC_PREFIX + value: {{ .Values.config.controlTopicPrefix }} + {{- end }} + {{- if .Values.config.configServiceEnabled }} + - name: WASMCLOUD_CONFIG_SERVICE + value: "true" + {{- end }} + {{- if .Values.config.allowLatest }} + - name: WASMCLOUD_OCI_ALLOW_LATEST + value: "true" + {{- end }} + {{- if .Values.config.allowedInsecure }} + - name: WASMCLOUD_OCI_ALLOWED_INSECURE + value: {{ include "wasmcloud-host.allowed-insecure" . }} + {{- end }} + {{- if .Values.config.policyService.enable }} + {{- if .Values.config.policyService.topic }} + - name: WASMCLOUD_POLICY_TOPIC + value: {{ .Values.config.policyService.topic | quote }} + {{- end }} + {{- if .Values.config.policyService.changesTopic }} + - name: WASMCLOUD_POLICY_CHANGES_TOPIC + value: {{ .Values.config.policyService.changesTopic | quote }} + {{- end }} + {{- if .Values.config.policyService.timeoutMs }} + - name: WASMCLOUD_POLICY_TIMEOUT + value: {{ .Values.config.policyService.timeoutMs | quote }} + {{- end }} + {{- end }} + {{- if .Values.config.secretsTopicPrefix }} + - name: WASMCLOUD_SECRETS_TOPIC + value: {{ .Values.config.secretsTopicPrefix | quote }} + {{- end }} + {{- if .Values.config.maxLinearMemoryBytes }} + - name: WASMCLOUD_MAX_LINEAR_MEMORY + value: {{ .Values.config.maxLinearMemoryBytes | int64 | quote }} + {{- end }} + {{- if .Values.config.hostLabels }} + {{- range $key, $value := .Values.config.hostLabels }} + {{- if $value }} + - name: WASMCLOUD_LABEL_{{ $key | lower }} + value: {{ $value }} + {{- end }} + {{- end }} + {{- end }} + - name: WASMCLOUD_LABEL_kubernetes + value: "true" + - name: WASMCLOUD_LABEL_kubernetes_pod_name + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: WASMCLOUD_LABEL_kubernetes_node_name + valueFrom: + fieldRef: + fieldPath: spec.nodeName + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + resources: + {{- toYaml .Values.resources.wasmcloud | nindent 12 }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + - name: nats-leaf + image: "{{ .Values.image.natsLeaf.repository }}:{{ .Values.image.natsLeaf.tag }}" + imagePullPolicy: {{ .Values.image.natsLeaf.pullPolicy }} + args: + - -js + - --config + - /nats/nats.conf + resources: + {{- toYaml .Values.resources.natsLeaf | nindent 12 }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + volumeMounts: + - name: {{ include "wasmcloud-host.nats-config-name" . }} + mountPath: /nats/nats.conf + subPath: "nats.conf" + readOnly: true + {{- if .Values.config.natsCredentialsSecret }} + - name: {{ .Values.config.natsCredentialsSecret }} + mountPath: /nats/nats.creds + subPath: "nats.creds" + readOnly: true + {{- end }} + volumes: + - name: {{ include "wasmcloud-host.nats-config-name" . }} + configMap: + name: {{ include "wasmcloud-host.nats-config-name" . }} + {{- if .Values.config.natsCredentialsSecret }} + - name: {{ .Values.config.natsCredentialsSecret }} + secret: + secretName: {{ .Values.config.natsCredentialsSecret }} + items: + - key: nats.creds + path: nats.creds + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} \ No newline at end of file diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/values.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/values.yaml new file mode 100644 index 0000000..74df02a --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-host/values.yaml @@ -0,0 +1,97 @@ +replicas: 1 +nameOverride: "" + +image: + repository: "ghcr.io/wasmcloud/wasmcloud" + pullPolicy: "IfNotPresent" + # Overrides the image tag whose default is the chart appVersion. + tag: "" + # Optional: The image to use for the NATS leaf that is deployed alongside the wasmCloud host. + # If not provided, the default upstream image will be used. + natsLeaf: + repository: "nats" + pullPolicy: "IfNotPresent" + tag: "2.10-alpine" + +config: + # Required: The lattice to connect the hosts to. + lattice: "default" + # Optional: Additional labels to apply to the host other than the defaults set by the host + hostLabels: {} + # Optional. The name of a secret containing a set of NATS credentials under 'nats.creds' key. + natsCredentialsSecret: "" + # Optional: The name of a secret containing the registry credentials. + # See https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-by-providing-credentials-on-the-command-line + registryCredentialsSecret: "wasmcloud-pull-secret" + # Optional: Enable structured logging for host logs. Defaults to "false". + enableStructuredLogging: false + # Optional: The control topic prefix to use for the host. Defaults to "wasmbus.ctl" + controlTopicPrefix: "" + # Optional: The Jetstream domain to use for the NATS sidecar. Defaults to "default". + jetstreamDomain: "default" + # Optional: The leaf node domain to use for the NATS sidecar. Defaults to "leaf". + leafNodeDomain: "leaf" + # Optional: Enable the config service for this host. Defaults to "false". + # Makes wasmCloud host issue requests to a config service on startup. + configServiceEnabled: false + # Optional: The log level to use for the host. Defaults to "INFO". + logLevel: "INFO" + # Optional: The address of the NATS server to connect to. Defaults to "nats://nats-headless..svc.cluster.local". + natsAddress: "" + # Optional: Allow the host to deploy using the latest tag on OCI components or providers. Defaults to "false". + allowLatest: false + # Optional: Allow the host to pull artifacts from OCI registries insecurely. + allowedInsecure: [] + # Optional: Policy service configuration. + policyService: + # Whether or not policy service is enabled + enable: false + # If provided, enables policy checks on start actions and component invocations. + topic: "wasmcloud.policy" + # If provided, allows the host to subscribe to updates on past policy decisions. Requires 'topic' above to be set. + changesTopic: "wasmcloud.policy.changes" + # If provided, allows setting a custom timeout for requesting policy decisions. Defaults to 1000. Requires 'topic' to be set. + timeoutMs: 1000 + # Optional: Observability options for configuring the OpenTelemetry integration. + observability: + # NOTE: Enables all signals (logs/metrics/traces) at once. Set it to 'false' and enable each signal individually in case you don't need all of them. + enable: false + endpoint: "" + # Either 'grpc' or 'http' + protocol: "" + logs: + enable: false + endpoint: "" + metrics: + enable: false + endpoint: "" + traces: + enable: false + endpoint: "" + # Optional: Subject prefix that will be used by the host to query for wasmCloud Secrets. + # See https://wasmcloud.com/docs/concepts/secrets for more context + secretsTopicPrefix: "wasmcloud.secrets" + # Optional: The maximum amount of memory bytes that a component can allocate. Defaults to 10485760 (10mb). + maxLinearMemoryBytes: + # Optional: Additional options to control how the underlying wasmCloud hosts are scheduled in Kubernetes. + # This includes setting resource requirements for the nats and wasmCloud host + # containers along with any additional pot template settings. + +imagePullSecrets: [] +podSecurityContext: {} +# fsGroup: 2000 + +securityContext: {} +# capabilities: +# drop: +# - ALL +# readOnlyRootFilesystem: true +# runAsNonRoot: true +# runAsUser: 1000 +resources: + wasmcloud: {} + natsLeaf: {} + +nodeSelector: {} +tolerations: [] +affinity: {} diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/.helmignore b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/Chart.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/Chart.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/Chart.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/Chart.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/ct.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/ct.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/ct.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/ct.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/templates/NOTES.txt b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/templates/NOTES.txt similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/templates/NOTES.txt rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/templates/NOTES.txt diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/templates/_helpers.tpl b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/templates/_helpers.tpl similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/templates/_helpers.tpl rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/templates/_helpers.tpl diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/templates/cluster-role.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/templates/cluster-role.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/templates/cluster-role.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/templates/cluster-role.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/templates/deployment.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/templates/deployment.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/templates/deployment.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/templates/deployment.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/templates/service.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/templates/service.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/templates/service.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/templates/service.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/templates/serviceaccount.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/templates/serviceaccount.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/templates/serviceaccount.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/templates/serviceaccount.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/templates/tests/test-connection.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/templates/tests/test-connection.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/templates/tests/test-connection.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/templates/tests/test-connection.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/values.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/values.yaml similarity index 100% rename from deploy/k8s/kustomize/deploy/base/charts/wasmcloud-operator/values.yaml rename to deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/charts/wasmcloud-operator/values.yaml diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/ct.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/ct.yaml new file mode 100644 index 0000000..ae9e45c --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/ct.yaml @@ -0,0 +1,3 @@ +charts: + - chart +validate-maintainers: false \ No newline at end of file diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/templates/NOTES.txt b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/templates/NOTES.txt new file mode 100644 index 0000000..440d4ee --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/templates/NOTES.txt @@ -0,0 +1,13 @@ +{{- if and (.Values.nats.enabled) (or .Values.host.enabled (and .Values.operator.enabled .Values.hostConfig.enabled)) }} +✨ Congratulations! Your wasmCloud platform has been deployed successfully. + - 🛀 To use the wash cli with your new wasmCloud platform, run: + {{ $namespace := .Release.Namespace -}} + {{- if ne $namespace "default" -}} + kubectl --namespace {{ $namespace }} port-forward service/{{ include "nats.fullname" (dict "Values" .Values.nats "Release" .Release "Chart" .Chart) }} 4222:4222 4223:4223 + {{- else -}} + kubectl port-forward service/{{ include "nats.fullname" (dict "Values" .Values.nats "Release" .Release "Chart" .Chart) }} 4222:4222 4223:4223 + {{- end }} + + - 🗺️ To launch the wasmCloud dashboard on http://localhost:3030, in a different terminal window, run: + wash ui +{{- end }} diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/templates/_helpers.tpl b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/templates/_helpers.tpl new file mode 100644 index 0000000..fd3ba70 --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "wasmcloud.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "wasmcloud.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "wasmcloud.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "wasmcloud.labels" -}} +helm.sh/chart: {{ include "wasmcloud.chart" . }} +{{ include "wasmcloud.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "wasmcloud.selectorLabels" -}} +app.kubernetes.io/name: {{ include "wasmcloud.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "wasmcloud.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "wasmcloud.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/templates/host-config.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/templates/host-config.yaml new file mode 100644 index 0000000..1c36927 --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/templates/host-config.yaml @@ -0,0 +1,143 @@ +{{- /* +This template is a convenience resource, used for leveraging the wasmCloud Operator to create and manage one or more wasmCloud hosts. +*/ -}} +{{- with $.Values.hostConfig}} +{{- if .enabled }} +apiVersion: k8s.wasmcloud.dev/v1alpha1 +kind: WasmCloudHostConfig +metadata: + name: {{ default "wasmcloud-host" (default $.Release.Name .name) }} + namespace: {{ default "default" (default $.Release.Namespace .namespace) }} + # Common labels + labels: + {{- include "wasmcloud.labels" $ | nindent 4 }} +spec: + # Optional: Number of hosts (pods). Defaults to 1. + hostReplicas: {{ default 1 .hostReplicas }} + # Required: The lattice to connect the hosts to. + lattice: {{ default "default" .lattice }} + # Optional: Additional labels to apply to the host other than the defaults set in the controller. + hostLabels: + {{- range $key, $value := .hostLabels }} + {{ $key }}: {{ $value }} + {{- end }} + # Required: Which wasmCloud version to use. + version: {{ default "latest" .version }} + # Optional: The image to use for the wasmCloud host. + {{- if .image }} + # If provided, the 'version' field will be ignored. + image: {{ .image }} + {{- end }} + # Optional: The image to use for the NATS leaf that is deployed alongside the wasmCloud host. + # If not provided, the default upstream image will be used. + {{- if .natsLeafImage }} + natsLeafImage: {{ .natsLeafImage }} + {{- end }} + # Optional. The name of a secret containing a set of NATS credentials under 'nats.creds' key. + {{- if or .secretName .natsCredentialsFile }} + secretName: {{ default (printf "%s-secret" (base .natsCredentialsFile)) .secretName }} + {{- end }} + # Optional: Enable structured logging for host logs. Defaults to "false". + enableStructuredLogging: {{ default false .enableStructuredLogging }} + # Optional: The name of a secret containing the registry credentials. + # See https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-by-providing-credentials-on-the-command-line + {{- if or .registryCredentialsSecret .registryCredentialsFile }} + registryCredentialsSecret: {{ default (printf "%s-secret" (base .registryCredentialsFile)) .registryCredentialsSecret }} + {{- end }} + # Optional: The control topic prefix to use for the host. Defaults to "wasmbus.ctl" + controlTopicPrefix: {{ default "wasmbus.ctl" .controlTopicPrefix }} + # Optional: The leaf node domain to use for the NATS sidecar. Defaults to "leaf". + leafNodeDomain: {{ default "leaf" .leafNodeDomain }} + # Optional: Enable the config service for this host. Defaults to "false". + # Makes wasmCloud host issue requests to a config service on startup. + configServiceEnabled: {{ default false .configServiceEnabled }} + # Optional: The log level to use for the host. Defaults to "INFO". + logLevel: {{ default "INFO" .logLevel }} + # Optional: The address of the NATS server to connect to. Defaults to "nats://nats-headless.default.svc.cluster.local". + natsAddress: {{ default "nats://nats-headless.default.svc.cluster.local" .natsAddress }} + # Optional: Allow the host to deploy using the latest tag on OCI components or providers. Defaults to "false". + allowLatest: {{ default false .allowLatest }} + # Optional: Allow the host to pull artifacts from OCI registries insecurely. + {{- with .allowedInsecure }}{{- if ne (len .) 0 }} + allowedInsecure: + {{- range .allowedInsecure }} + - {{ . }} + {{- end }} + {{- end }}{{- end }} + # Optional: Policy service configuration. + {{- with .policyService }} + policyService: + # If provided, enables policy checks on start actions and component invocations. + {{- if .topic }} + topic: {{ .topic }} + # If provided, allows the host to subscribe to updates on past policy decisions. Requires 'topic' above to be set. + {{- if .changesTopic }} + changesTopic: {{ .changesTopic }} + {{- end }} + # If provided, allows setting a custom timeout for requesting policy decisions. Defaults to 1000. Requires 'topic' to be set. + timeoutMs: {{ default 1000 .timeoutMs }} + {{- end }} + {{- end }} + # Optional: Observability options for configuring the OpenTelemetry integration. + {{- with .observability }} + observability: + # NOTE: Enables all signals (logs/metrics/traces) at once. Set it to 'false' and enable each signal individually in case you don't need all of them. + enable: {{ default true .enable }} + endpoint: {{ default "otel-collector.svc" .endpoint }} + # Either 'grpc' or 'http' + protocol: {{ default "http" .protocol }} + logs: + enable: {{ default false .logs.enable }} + endpoint: {{ default "logs-specific-otel-collector.svc" .logs.endpoint }} + metrics: + enable: {{ default false .metrics.enable }} + endpoint: {{ default "metrics-specific-otel-collector.svc" .metrics.endpoint }} + traces: + enable: {{ default false .traces.enable }} + endpoint: {{ default "traces-specific-otel-collector.svc" .traces.endpoint }} + {{- end }} + # Optional: Subject prefix that will be used by the host to query for wasmCloud Secrets. + # See https://wasmcloud.com/docs/concepts/secrets for more context + secretsTopicPrefix: {{ default "wasmcloud.secrets" .secretsTopicPrefix }} + # Optional: The maximum amount of memory bytes that a component can allocate. + maxLinearMemoryBytes: {{ default 20000000 .maxLinearMemoryBytes }} + # Optional: Additional options to control how the underlying wasmCloud hosts are scheduled in Kubernetes. + # This includes setting resource requirements for the nats and wasmCloud host + # containers along with any additional pot template settings. + {{- with .schedulingOptions }} + schedulingOptions: + # Optional: Enable the following to run the wasmCloud hosts as a DaemonSet. Defaults to "false". + daemonset: {{ if and (eq .hostReplicas 1) (eq .daemonset true) }}true{{ else }}false{{ end }} + # Optional: Set the resource requirements for the nats and wasmCloud host containers. + # See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for valid values + {{- with .resources }} + resources: + nats: + requests: + cpu: {{ .nats.requests.cpu }} + memory: {{ .nats.requests.memory }} + limits: + cpu: {{ .nats.limits.cpu }} + memory: {{ .nats.limits.memory }} + wasmCloudHost: + requests: + cpu: {{ .wasmCloudHost.requests.cpu }} + memory: {{ .wasmCloudHost.requests.memory }} + limits: + cpu: {{ .wasmCloudHost.limits.cpu }} + memory: {{ .wasmCloudHost.limits.memory }} + {{- end }} + # Optional: Any additional pod template settings to apply to the wasmCloud host pods. + # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#podspec-v1-core for all valid options. + # Note that you *cannot* set the `containers` field here as it is managed by the controller. + podTemplateAdditions: + {{- if .podTemplateAdditions }} + {{- tpl (.podTemplateAdditions | toYaml) . | nindent 4 }} + {{- else }} + spec: + nodeSelector: + kubernetes.io/os: "linux" + {{- end }} + {{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/templates/host-secrets.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/templates/host-secrets.yaml new file mode 100644 index 0000000..017ae5e --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/templates/host-secrets.yaml @@ -0,0 +1,41 @@ +{{- /* +This template is a convenience resource, used for creating a Secret that contains the login credentials for the private registry +where wasmCloud host images are stored. +*/ -}} +{{- with $.Values.hostConfig }} +{{- if and .enabled .registryCredentialsFile }} +# The file containing the login credentials - formatted as a Docker configuration JSON file - must be placed within the chart's main directory or one of its subdirectories. +apiVersion: v1 +kind: Secret +metadata: + name: {{ default (printf "%s-secret" (base .registryCredentialsFile)) .registryCredentialsSecret }} + namespace: {{ default "default" (default $.Release.Namespace .namespace) }} + # Common labels + labels: + {{- include "wasmcloud.labels" $ | nindent 4 }} +type: kubernetes.io/dockerconfigjson +data: + .dockerconfigjson: {{ $.Files.Get .registryCredentialsFile | b64enc }} + # .dockerconfigjson: {{ printf "%s" (dir .registryCredentialsFile) }} +{{- end }} +{{- end }} +--- +{{- /* +This template is a convenience resource, used for creating a Secret that contains the NATS access credentials for the wasmCloud host. +*/ -}} +{{- with $.Values.hostConfig }} +{{- if and .enabled .natsCredentialsFile }} +# The file containing the NATS access credentials must be placed within the chart's main directory or one of its subdirectories. +apiVersion: v1 +kind: Secret +metadata: + name: {{ default (printf "%s-secret" (base .natsCredentialsFile)) .secretName }} + namespace: {{ default "default" (default $.Release.Namespace .namespace) }} + # Common labels + labels: + {{- include "wasmcloud.labels" $ | nindent 4 }} +type: Opaque +data: + nats.creds: {{ $.Files.Get .natsCredentialsFile | b64enc }} +{{- end }} +{{- end }} diff --git a/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/values.yaml b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/values.yaml new file mode 100644 index 0000000..a4b851b --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/charts/wasmcloud-platform/values.yaml @@ -0,0 +1,83 @@ +fullnameOverride: "wasmcloud-platform" +nameOverride: "wasmcloud-platform" + +nats: + # Whether to install the nats chart (https://nats-io.github.io/k8s/helm/charts/nats) + enabled: true + fullnameOverride: "nats" + nameOverride: "nats" + # Source: https://github.com/wasmCloud/wasmcloud-operator/blob/main/examples/quickstart/nats-values.yaml + config: + cluster: + enabled: true + replicas: 3 + leafnodes: + enabled: true + websocket: + enabled: true + port: 4223 + jetstream: + enabled: true + fileStore: + pvc: + size: 10Gi + merge: + domain: default + # # Quickstart configuration + # statefulSet: + # name: nats + # service: + # name: nats + # headlessService: + # name: nats-headless + +wadm: + # Whether to install the wadm chart (oci://ghcr.io/wasmcloud/charts/wadm) + enabled: true + fullnameOverride: "wadm" + nameOverride: "wadm" + # Source: https://github.com/wasmCloud/wasmcloud-operator/blob/main/examples/quickstart/wadm-values.yaml + wadm: + image: + tag: v0.15.0 + config: + nats: + server: "nats://nats-headless.default.svc.cluster.local" + # creds: + # jwt: "" + # seed: "" + # # If you're using the wasmCloud Operator, the secret could be created by the chart using the '.hostConfig.natsCredentialsFile' setting. + # secretName: "" + # key: "nats.creds" + resources: {} + +operator: + # Whether to install the wasmcloud-operator chart (oci://ghcr.io/wasmcloud/charts/wasmcloud-operator) + # Make sure to either install wasmCloud Operator or wasmCloud Host, not both + enabled: true + fullnameOverride: "wasmcloud-operator" + nameOverride: "wasmcloud-operator" + # image: + # tag: 0.3.2 + +host: + # Whether to install the wasmcloud-host chart (oci://ghcr.io/wasmcloud/charts/wasmcloud-host) + # Make sure to either install wasmCloud Operator or wasmCloud Host, not both + enabled: false + fullnameOverride: "wasmcloud" + nameOverride: "wasmcloud" + +hostConfig: + # Whether to use the wasmCloud host configuration custom resource; defaults to "false". + enabled: false + name: wasmcloud-host + lattice: default + # # Number of hosts (pods). Defaults to 1. + # hostReplicas: 1 + # Which version of wasmCloud to use; defaults to "latest" + version: "1.2.1" + # registryCredentialsFile: config.json + # natsCredentialsFile: secret.yaml + resources: + nats: {} + wasmCloudHost: {} diff --git a/deploy/k8s/kustomize/deploy/base/kustomization.yaml b/deploy/k8s/kustomize/deploy/base/kustomization.yaml index 8b5af60..5d0bb32 100644 --- a/deploy/k8s/kustomize/deploy/base/kustomization.yaml +++ b/deploy/k8s/kustomize/deploy/base/kustomization.yaml @@ -1,8 +1,5 @@ resources: -- charts-rendered/wadm.yaml -- charts-rendered/wasmcloud-operator.yaml -# pre-req: -# - charts-rendered/nats-rendered.yaml +- charts-rendered/wasmcloud-platform.yaml generatorOptions: disableNameSuffixHash: true diff --git a/deploy/k8s/kustomize/deploy/base/nats-values.yaml b/deploy/k8s/kustomize/deploy/base/nats-values.yaml deleted file mode 100644 index 0ea5163..0000000 --- a/deploy/k8s/kustomize/deploy/base/nats-values.yaml +++ /dev/null @@ -1,21 +0,0 @@ -config: - cluster: - enabled: true - replicas: 3 - leafnodes: - enabled: true - websocket: - enabled: true - port: 4223 - jetstream: - enabled: true - fileStore: - pvc: - size: 10Gi - merge: - domain: default - service: - enabled: true - ports: - cluster: - enabled: true diff --git a/deploy/k8s/kustomize/deploy/base/values.yaml b/deploy/k8s/kustomize/deploy/base/values.yaml new file mode 100644 index 0000000..4622083 --- /dev/null +++ b/deploy/k8s/kustomize/deploy/base/values.yaml @@ -0,0 +1,81 @@ + +fullnameOverride: "wasmcloud-platform" +nameOverride: "wasmcloud-platform" + +wadm: + # Whether to install the wadm chart (oci://ghcr.io/wasmcloud/charts/wadm) + enabled: true + fullnameOverride: "wadm" + nameOverride: "wadm" + # Source: https://github.com/wasmCloud/wasmcloud-operator/blob/main/examples/quickstart/wadm-values.yaml + wadm: + config: + nats: + # server: "nats.default.svc.cluster.local:4222" + server: "nats://nats-headless.default.svc.cluster.local" + # creds: + # jwt: "" + # seed: "" + # # If you're using the wasmCloud Operator, the secret could be created by the chart using the '.hostConfig.natsCredentialsFile' setting. + # secretName: "" + # key: "nats.creds" + resources: {} + +nats: + # Whether to install the nats chart (https://nats-io.github.io/k8s/helm/charts/nats) + enabled: true + fullnameOverride: "nats" + nameOverride: "nats" + # Source: https://github.com/wasmCloud/wasmcloud-operator/blob/main/examples/quickstart/nats-values.yaml + config: + cluster: + enabled: true + replicas: 3 + leafnodes: + enabled: true + websocket: + enabled: true + port: 4223 + jetstream: + enabled: true + fileStore: + pvc: + size: 10Gi + merge: + domain: default + service: + enabled: true + ports: + cluster: + enabled: true + +operator: + # Whether to install the wasmcloud-operator chart (oci://ghcr.io/wasmcloud/charts/wasmcloud-operator) + # Make sure to either install wasmCloud Operator or wasmCloud Host, not both + enabled: true + fullnameOverride: "wasmcloud-operator" + nameOverride: "wasmcloud-operator" + # image: + # tag: 0.3.2 + +host: + # Whether to install the wasmcloud-host chart (oci://ghcr.io/wasmcloud/charts/wasmcloud-host) + # Make sure to either install wasmCloud Operator or wasmCloud Host, not both + enabled: false + fullnameOverride: "wasmcloud" + nameOverride: "wasmcloud" + +hostConfig: + # Whether to use the wasmCloud host configuration custom resource; defaults to "false". + enabled: false + name: wasmcloud-host + lattice: default + # # Number of hosts (pods). Defaults to 1. + # hostReplicas: 1 + # Which version of wasmCloud to use; defaults to "latest" + version: "1.4.2" + # registryCredentialsFile: config.json + # natsCredentialsFile: secret.yaml + resources: + nats: {} + wasmCloudHost: {} diff --git a/deploy/k8s/kustomize/deploy/base/wadm-values.yaml b/deploy/k8s/kustomize/deploy/base/wadm-values.yaml deleted file mode 100644 index 120b9de..0000000 --- a/deploy/k8s/kustomize/deploy/base/wadm-values.yaml +++ /dev/null @@ -1,4 +0,0 @@ -wadm: - config: - nats: - server: "nats.default.svc.cluster.local:4222" diff --git a/deploy/k8s/kustomize/deploy/dev/hosts/wasmcloud-host-config.yaml b/deploy/k8s/kustomize/deploy/dev/hosts/wasmcloud-host-config.yaml index 1e0307c..9e28dc8 100644 --- a/deploy/k8s/kustomize/deploy/dev/hosts/wasmcloud-host-config.yaml +++ b/deploy/k8s/kustomize/deploy/dev/hosts/wasmcloud-host-config.yaml @@ -4,8 +4,7 @@ metadata: name: wasmcloud-host spec: lattice: default - # version: "1.1.1" - version: "1.0.4" + version: "1.4.2" hostLabels: cluster-type: kind # registryCredentialsSecret: "regcred" diff --git a/deploy/k8s/kustomize/deploy/kind/cluster.yaml b/deploy/k8s/kustomize/deploy/kind/cluster.yaml index a723a7d..a8caf6a 100644 --- a/deploy/k8s/kustomize/deploy/kind/cluster.yaml +++ b/deploy/k8s/kustomize/deploy/kind/cluster.yaml @@ -3,12 +3,6 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - kubeadmConfigPatches: - - | - kind: InitConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "ingress-ready=true" extraPortMappings: - containerPort: 80 hostPort: 80 diff --git a/deploy/k8s/kustomize/deploy/kind/ingress-controller.yaml b/deploy/k8s/kustomize/deploy/kind/ingress-controller.yaml index 5cfeca6..7ad29eb 100644 --- a/deploy/k8s/kustomize/deploy/kind/ingress-controller.yaml +++ b/deploy/k8s/kustomize/deploy/kind/ingress-controller.yaml @@ -1,7 +1,7 @@ # # Contents of the file: # https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml -# Aug-2024 +# Nov-10-2024 # apiVersion: v1 kind: Namespace @@ -20,7 +20,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx namespace: ingress-nginx --- @@ -33,7 +33,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx-admission namespace: ingress-nginx --- @@ -45,7 +45,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx namespace: ingress-nginx rules: @@ -135,7 +135,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx-admission namespace: ingress-nginx rules: @@ -154,7 +154,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx rules: - apiGroups: @@ -236,7 +236,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx-admission rules: - apiGroups: @@ -255,7 +255,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx namespace: ingress-nginx roleRef: @@ -275,7 +275,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx-admission namespace: ingress-nginx roleRef: @@ -294,7 +294,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx roleRef: apiGroup: rbac.authorization.k8s.io @@ -313,7 +313,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx-admission roleRef: apiGroup: rbac.authorization.k8s.io @@ -325,8 +325,7 @@ subjects: namespace: ingress-nginx --- apiVersion: v1 -data: - allow-snippet-annotations: "false" +data: null kind: ConfigMap metadata: labels: @@ -334,7 +333,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx-controller namespace: ingress-nginx --- @@ -346,7 +345,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx-controller namespace: ingress-nginx spec: @@ -368,7 +367,7 @@ spec: app.kubernetes.io/component: controller app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx - type: NodePort + type: LoadBalancer --- apiVersion: v1 kind: Service @@ -378,7 +377,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx-controller-admission namespace: ingress-nginx spec: @@ -401,7 +400,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx-controller namespace: ingress-nginx spec: @@ -423,7 +422,7 @@ spec: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 spec: containers: - args: @@ -436,7 +435,6 @@ spec: - --validating-webhook-certificate=/usr/local/certificates/cert - --validating-webhook-key=/usr/local/certificates/key - --watch-ingress-without-class=true - - --enable-metrics=false - --publish-status-address=localhost env: - name: POD_NAME @@ -449,7 +447,7 @@ spec: fieldPath: metadata.namespace - name: LD_PRELOAD value: /usr/local/lib/libmimalloc.so - image: registry.k8s.io/ingress-nginx/controller:v1.11.1@sha256:e6439a12b52076965928e83b7b56aae6731231677b01e81818bce7fa5c60161a + image: registry.k8s.io/ingress-nginx/controller:v1.12.0-beta.0@sha256:9724476b928967173d501040631b23ba07f47073999e80e34b120e8db5f234d5 imagePullPolicy: IfNotPresent lifecycle: preStop: @@ -501,6 +499,7 @@ spec: drop: - ALL readOnlyRootFilesystem: false + runAsGroup: 82 runAsNonRoot: true runAsUser: 101 seccompProfile: @@ -511,7 +510,6 @@ spec: readOnly: true dnsPolicy: ClusterFirst nodeSelector: - ingress-ready: "true" kubernetes.io/os: linux serviceAccountName: ingress-nginx terminationGracePeriodSeconds: 0 @@ -535,7 +533,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx-admission-create namespace: ingress-nginx spec: @@ -546,7 +544,7 @@ spec: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx-admission-create spec: containers: @@ -560,7 +558,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.4.1@sha256:36d05b4077fb8e3d13663702fa337f124675ba8667cbd949c03a8e8ea6fa4366 + image: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.4.4@sha256:a9f03b34a3cbfbb26d103a14046ab2c5130a80c3d69d526ff8063d2b37b9fd3f imagePullPolicy: IfNotPresent name: create securityContext: @@ -569,6 +567,7 @@ spec: drop: - ALL readOnlyRootFilesystem: true + runAsGroup: 65532 runAsNonRoot: true runAsUser: 65532 seccompProfile: @@ -586,7 +585,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx-admission-patch namespace: ingress-nginx spec: @@ -597,7 +596,7 @@ spec: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx-admission-patch spec: containers: @@ -613,7 +612,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.4.1@sha256:36d05b4077fb8e3d13663702fa337f124675ba8667cbd949c03a8e8ea6fa4366 + image: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.4.4@sha256:a9f03b34a3cbfbb26d103a14046ab2c5130a80c3d69d526ff8063d2b37b9fd3f imagePullPolicy: IfNotPresent name: patch securityContext: @@ -622,6 +621,7 @@ spec: drop: - ALL readOnlyRootFilesystem: true + runAsGroup: 65532 runAsNonRoot: true runAsUser: 65532 seccompProfile: @@ -639,7 +639,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: nginx spec: controller: k8s.io/ingress-nginx @@ -652,7 +652,7 @@ metadata: app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.11.1 + app.kubernetes.io/version: 1.12.0-beta.0 name: ingress-nginx-admission webhooks: - admissionReviewVersions: @@ -662,6 +662,7 @@ webhooks: name: ingress-nginx-controller-admission namespace: ingress-nginx path: /networking/v1/ingresses + port: 443 failurePolicy: Fail matchPolicy: Equivalent name: validate.nginx.ingress.kubernetes.io @@ -675,4 +676,4 @@ webhooks: - UPDATE resources: - ingresses - sideEffects: None \ No newline at end of file + sideEffects: None diff --git a/deploy/k8s/kustomize/scripts/kind-cluster.sh b/deploy/k8s/kustomize/scripts/kind-cluster.sh index 9d5b853..94465ec 100755 --- a/deploy/k8s/kustomize/scripts/kind-cluster.sh +++ b/deploy/k8s/kustomize/scripts/kind-cluster.sh @@ -1,53 +1,42 @@ #!/bin/bash set -e -x -o pipefail -kind create cluster --config=deploy/kind/cluster.yaml +kind create cluster --config=deploy/kind/cluster.yaml --wait 30s ############# # Ingress ############# kubectl apply -k deploy/kind -############# -# Nats -############# -# prefix with helm chart seems to break things down. -# workaround by helm templating instead of kustomize: -kubectl apply -f deploy/base/charts-rendered/nats.yaml - -# wait or nats to be ready -kubectl rollout status deploy,sts -l app.kubernetes.io/instance=nats - -# test nats: -kubectl exec -it deployment/nats-box -- nats pub test hi - -############################## -# wasmCloud operator and wadm -############################## -# we apply Ingress at this step, validate it's ready kubectl wait --namespace ingress-nginx \ --for=condition=ready pod \ --selector=app.kubernetes.io/component=controller \ --timeout=90s -kustomize build --enable-helm ./deploy/dev | kubectl apply -f - +###################### +# wasmCloud platform +###################### +kubectl apply -k ./deploy/dev + +# wait for nats +kubectl rollout status deploy,sts -l app.kubernetes.io/name=nats + +# wait for wadm +kubectl wait --for=condition=available --timeout=600s deploy -l app.kubernetes.io/name=wadm -# validate wasmcloud-operator -kubectl rollout status deploy -l app.kubernetes.io/name=wasmcloud-operator +# wait for wasmcloud-operator +kubectl wait --for=condition=available --timeout=600s deploy -l app.kubernetes.io/name=wasmcloud-operator # validate operator added OAM CRD kubectl wait --for condition=available apiservices.apiregistration.k8s.io v1beta1.core.oam.dev # Configure wasmCloud host -kustomize build ./deploy/dev/hosts | kubectl apply -f - +kubectl apply -k ./deploy/dev/hosts kubectl wait --for condition=established --timeout=60s crd/wasmcloudhostconfigs.k8s.wasmcloud.dev -echo "Validate wadm deployment" -kubectl rollout status deploy -l app.kubernetes.io/instance=wadm - -############################## -# Deploy Go and Rust apps ############################## +# Deploy apps +############################## kustomize build ./deploy/dev/apps | kubectl apply -f - # wait for http service diff --git a/deploy/k8s/kustomize/scripts/update-helm.sh b/deploy/k8s/kustomize/scripts/update-helm.sh index 101a6d2..14d33b1 100755 --- a/deploy/k8s/kustomize/scripts/update-helm.sh +++ b/deploy/k8s/kustomize/scripts/update-helm.sh @@ -2,34 +2,12 @@ # Following practices from https://github.com/kubernetes-sigs/kustomize/blob/master/examples/chart.md -# Pass in -r to remove the charts directory rm -rf deploy/base/charts -WADM_CHART_VERSION=0.2.5 -WASMCLOUD_OPERATOR_CHART_VERSION=0.1.5 -NATS_CHART_VERSION=1.2.2 +WASMCLOUD_PLATFORM_CHART_VERSION=0.1.0 -helm pull oci://ghcr.io/wasmcloud/charts/wadm \ - --version $WADM_CHART_VERSION \ +helm pull oci://ghcr.io/wasmcloud/charts/wasmcloud-platform \ + --version $WASMCLOUD_PLATFORM_CHART_VERSION \ --untar \ --untardir deploy/base/charts -helm template wadm --values ./deploy/base/wadm-values.yaml --version $WADM_CHART_VERSION ./deploy/base/charts/wadm > deploy/base/charts-rendered/wadm.yaml - -helm pull oci://ghcr.io/wasmcloud/charts/wasmcloud-operator \ - --version $WASMCLOUD_OPERATOR_CHART_VERSION \ - --untar \ - --untardir deploy/base/charts -helm template wasmcloud-operator --version $WASMCLOUD_OPERATOR_CHART_VERSION ./deploy/base/charts/wasmcloud-operator > deploy/base/charts-rendered/wasmcloud-operator.yaml - -# ugh this should work but gzip header error on the tgz, helm isn't handling redirects -# helm pull https://nats-io.github.io/k8s/helm/charts/ --version ^1.2 \ -# --untar \ -# --untardir deploy/base/charts/nats -# workaround: -helm repo add nats https://nats-io.github.io/k8s/helm/charts/ -helm repo update -helm pull nats/nats --version $NATS_CHART_VERSION -tar -xvf nats-${NATS_CHART_VERSION}.tgz -C deploy/base/charts -helm template nats --values ./deploy/base/nats-values.yaml --version $NATS_CHART_VERSION ./deploy/base/charts/nats > deploy/base/charts-rendered/nats.yaml -# cleanup -rm nats-1.2.2.tgz +helm template wasmcloud-platform --values ./deploy/base/values.yaml --version $WASMCLOUD_PLATFORM_CHART_VERSION ./deploy/base/charts/wasmcloud-platform > deploy/base/charts-rendered/wasmcloud-platform.yaml