diff --git a/opsroot.json b/opsroot.json index a4231c89..677fac30 100644 --- a/opsroot.json +++ b/opsroot.json @@ -5,7 +5,7 @@ "coreutils": "arch b2sum b3sum base32 basename basenc cat chgrp chmod chown chroot cksum comm cp csplit cut date dd df dir dircolors dirname du env expand expr factor fmt fold groups hashsum head hostid hostname id install join kill link ln logname ls md5sum mkdir mkfifo mknod mktemp more mv nice nl nohup nproc numfmt od paste pathchk pinky pr printenv printf ptx pwd readlink realpath rm rmdir seq sha1sum sha224sum sha256sum sha3-224sum sha3-256sum sha3-384sum sha3-512sum sha384sum sha3sum sha512sum shake128sum shake256sum shred shuf sleep sort split stat stdbuf stty sum sync tac tail tee timeout touch tr truncate tsort tty uname unexpand uniq unlink uptime users vdir wc who whoami yes" }, "images": { - "operator": "registry.hub.docker.com/apache/openserverless-operator:0.1.0-incubating.2510012114", + "operator": "registry.hub.docker.com/apache/openserverless-operator:0.1.0-incubating.2512151437", "controller": "ghcr.io/nuvolaris/openwhisk-controller:3.1.0-mastrogpt.2402101445", "invoker": "ghcr.io/nuvolaris/openwhisk-invoker:3.1.0-mastrogpt.2402101445", "streamer": "registry.hub.docker.com/apache/openserverless-streamer:0.1.0-incubating.2505031325", diff --git a/setup/docker/ingress-deploy.yaml b/setup/docker/ingress-deploy.yaml index 55712e74..0e7a16cd 100644 --- a/setup/docker/ingress-deploy.yaml +++ b/setup/docker/ingress-deploy.yaml @@ -36,18 +36,6 @@ metadata: name: ingress-nginx namespace: ingress-nginx --- -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app.kubernetes.io/component: admission-webhook - app.kubernetes.io/instance: ingress-nginx - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.7.0 - name: ingress-nginx-admission - namespace: ingress-nginx ---- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -139,26 +127,6 @@ rules: - get --- apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - labels: - app.kubernetes.io/component: admission-webhook - app.kubernetes.io/instance: ingress-nginx - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.7.0 - name: ingress-nginx-admission - namespace: ingress-nginx -rules: -- apiGroups: - - "" - resources: - - secrets - verbs: - - get - - create ---- -apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: @@ -240,25 +208,6 @@ rules: - get --- apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/component: admission-webhook - app.kubernetes.io/instance: ingress-nginx - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.7.0 - name: ingress-nginx-admission -rules: -- apiGroups: - - admissionregistration.k8s.io - resources: - - validatingwebhookconfigurations - verbs: - - get - - update ---- -apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: @@ -279,26 +228,6 @@ subjects: namespace: ingress-nginx --- apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - app.kubernetes.io/component: admission-webhook - app.kubernetes.io/instance: ingress-nginx - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.7.0 - name: ingress-nginx-admission - namespace: ingress-nginx -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: ingress-nginx-admission -subjects: -- kind: ServiceAccount - name: ingress-nginx-admission - namespace: ingress-nginx ---- -apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: @@ -316,25 +245,6 @@ subjects: name: ingress-nginx namespace: ingress-nginx --- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/component: admission-webhook - app.kubernetes.io/instance: ingress-nginx - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.7.0 - name: ingress-nginx-admission -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: ingress-nginx-admission -subjects: -- kind: ServiceAccount - name: ingress-nginx-admission - namespace: ingress-nginx ---- apiVersion: v1 data: allow-snippet-annotations: "true" @@ -381,29 +291,6 @@ spec: app.kubernetes.io/name: ingress-nginx type: NodePort --- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: controller - app.kubernetes.io/instance: ingress-nginx - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.7.0 - name: ingress-nginx-controller-admission - namespace: ingress-nginx -spec: - ports: - - appProtocol: https - name: https-webhook - port: 443 - targetPort: webhook - selector: - app.kubernetes.io/component: controller - app.kubernetes.io/instance: ingress-nginx - app.kubernetes.io/name: ingress-nginx - type: ClusterIP ---- apiVersion: apps/v1 kind: Deployment metadata: @@ -443,9 +330,6 @@ spec: - --controller-class=k8s.io/ingress-nginx - --ingress-class=nginx - --configmap=$(POD_NAMESPACE)/ingress-nginx-controller - - --validating-webhook=:8443 - - --validating-webhook-certificate=/usr/local/certificates/cert - - --validating-webhook-key=/usr/local/certificates/key - --watch-ingress-without-class=true - --publish-status-address=localhost env: @@ -459,7 +343,7 @@ spec: fieldPath: metadata.namespace - name: LD_PRELOAD value: /usr/local/lib/libmimalloc.so - image: registry.k8s.io/ingress-nginx/controller:v1.7.0@sha256:7612338342a1e7b8090bef78f2a04fffcadd548ccaabe8a47bf7758ff549a5f7 + image: registry.k8s.io/ingress-nginx/controller:v1.7.0 imagePullPolicy: IfNotPresent lifecycle: preStop: @@ -486,9 +370,6 @@ spec: hostPort: 443 name: https protocol: TCP - - containerPort: 8443 - name: webhook - protocol: TCP readinessProbe: failureThreshold: 3 httpGet: @@ -511,10 +392,6 @@ spec: drop: - ALL runAsUser: 101 - volumeMounts: - - mountPath: /usr/local/certificates/ - name: webhook-cert - readOnly: true dnsPolicy: ClusterFirst nodeSelector: ingress-ready: "true" @@ -528,106 +405,6 @@ spec: - effect: NoSchedule key: node-role.kubernetes.io/control-plane operator: Equal - volumes: - - name: webhook-cert - secret: - secretName: ingress-nginx-admission ---- -apiVersion: batch/v1 -kind: Job -metadata: - labels: - app.kubernetes.io/component: admission-webhook - app.kubernetes.io/instance: ingress-nginx - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.7.0 - name: ingress-nginx-admission-create - namespace: ingress-nginx -spec: - template: - metadata: - labels: - app.kubernetes.io/component: admission-webhook - app.kubernetes.io/instance: ingress-nginx - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.7.0 - name: ingress-nginx-admission-create - spec: - containers: - - args: - - create - - --host=ingress-nginx-controller-admission,ingress-nginx-controller-admission.$(POD_NAMESPACE).svc - - --namespace=$(POD_NAMESPACE) - - --secret-name=ingress-nginx-admission - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f - imagePullPolicy: IfNotPresent - name: create - securityContext: - allowPrivilegeEscalation: false - nodeSelector: - kubernetes.io/os: linux - restartPolicy: OnFailure - securityContext: - fsGroup: 2000 - runAsNonRoot: true - runAsUser: 2000 - serviceAccountName: ingress-nginx-admission ---- -apiVersion: batch/v1 -kind: Job -metadata: - labels: - app.kubernetes.io/component: admission-webhook - app.kubernetes.io/instance: ingress-nginx - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.7.0 - name: ingress-nginx-admission-patch - namespace: ingress-nginx -spec: - template: - metadata: - labels: - app.kubernetes.io/component: admission-webhook - app.kubernetes.io/instance: ingress-nginx - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.7.0 - name: ingress-nginx-admission-patch - spec: - containers: - - args: - - patch - - --webhook-name=ingress-nginx-admission - - --namespace=$(POD_NAMESPACE) - - --patch-mutating=false - - --secret-name=ingress-nginx-admission - - --patch-failure-policy=Fail - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f - imagePullPolicy: IfNotPresent - name: patch - securityContext: - allowPrivilegeEscalation: false - nodeSelector: - kubernetes.io/os: linux - restartPolicy: OnFailure - securityContext: - fsGroup: 2000 - runAsNonRoot: true - runAsUser: 2000 - serviceAccountName: ingress-nginx-admission --- apiVersion: networking.k8s.io/v1 kind: IngressClass @@ -641,36 +418,3 @@ metadata: name: nginx spec: controller: k8s.io/ingress-nginx ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - labels: - app.kubernetes.io/component: admission-webhook - app.kubernetes.io/instance: ingress-nginx - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx - app.kubernetes.io/version: 1.7.0 - name: ingress-nginx-admission -webhooks: -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: ingress-nginx-controller-admission - namespace: ingress-nginx - path: /networking/v1/ingresses - failurePolicy: Fail - matchPolicy: Equivalent - name: validate.nginx.ingress.kubernetes.io - rules: - - apiGroups: - - networking.k8s.io - apiVersions: - - v1 - operations: - - CREATE - - UPDATE - resources: - - ingresses - sideEffects: None diff --git a/setup/nuvolaris/opsfile.yml b/setup/nuvolaris/opsfile.yml index 24e5b68d..b03be406 100644 --- a/setup/nuvolaris/opsfile.yml +++ b/setup/nuvolaris/opsfile.yml @@ -23,14 +23,14 @@ vars: CAT: '{{if eq .D ""}}true{{else}}cat{{end}}' RETRY: 100 TIMEOUT: 10 - ETC: + ETC: sh: if $WSK_INSECURE ; then echo "-i" ; else echo "" ; fi CFG: "kubectl -n nuvolaris get wsk/controller" SLEEP: "500" env: - KUBECONFIG: - sh: | + KUBECONFIG: + sh: | if test -e "$OPS_TMP/kubeconfig" then echo "$OPS_TMP/kubeconfig" else echo ~/.kube/config @@ -42,7 +42,7 @@ tasks: #desc: wait for apihost available silent: true env: - BAR: + BAR: sh: printf "%*s" {{.RETRY}} "" | tr ' ' '#' cmds: - | @@ -61,10 +61,10 @@ tasks: echo $APIHOST wait-cm: - desc: wait for an annotation in nuvolaris cm/config + desc: wait for an annotation in nuvolaris cm/config silent: true env: - BAR: + BAR: sh: printf "%*s" {{.RETRY}} "" | tr ' ' '#' cmds: - test -n "{{.JSONPATH}}" || die "use JSONPATH=" @@ -72,13 +72,13 @@ tasks: N=0 RES=false while [[ $N -lt {{.RETRY}} ]] - do + do ANNOT_VALUE="$(kubectl -n nuvolaris get cm/config -o jsonpath='{{.JSONPATH}}')" if [[ -z "$ANNOT_VALUE" ]] - then + then printf "\rwaiting for completing system initialization: [${BAR:0:$((N++))}]" sleep 5 - else + else RES=true; break fi done @@ -89,7 +89,7 @@ tasks: desc: wait for an annotation in nuvolaris cm/config to be set and have a specific value silent: true env: - BAR: + BAR: sh: printf "%*s" {{.RETRY}} "" | tr ' ' '#' cmds: - test -n "{{.JSONPATH}}" || die "use JSONPATH=" @@ -101,10 +101,10 @@ tasks: N=0 RES=false while [[ $N -lt {{.RETRY}} ]] - do + do ANNOT_VALUE="$(kubectl -n nuvolaris get cm/config -o jsonpath='{.metadata.annotations.system_action_status}')" if [[ -z "$ANNOT_VALUE" ]] - then + then printf "\rwaiting for completing system initialization: [${BAR:0:$((N++))}]" sleep 5 else @@ -120,11 +120,11 @@ tasks: silent: true cmds: - | - export OPSDEV_APIHOST=$(kubectl --kubeconfig="$KUBECONFIG" -n nuvolaris get cm/config -o jsonpath='{.metadata.annotations.apihost}') + export OPSDEV_APIHOST=$(ops util kubeget cm/config .metadata.annotations.apihost) export OPSDEV_USERNAME=nuvolaris - export AUTH=$(kubectl --kubeconfig="$KUBECONFIG" -n nuvolaris get wsk/controller -ojsonpath='{.spec.openwhisk.namespaces.nuvolaris}') + export AUTH=$(ops util kubeget wsk/controller .spec.openwhisk.namespaces.nuvolaris) echo Checking connection... - retry -t 100 -m 600 $OPS -wsk {{.ETC}} --apihost "$OPSDEV_APIHOST" --auth "$AUTH" namespace list + retry -t 100 -m 600 ops -wsk {{.ETC}} --apihost "$OPSDEV_APIHOST" --auth "$AUTH" namespace list export OPS_PASSWORD=$(kubectl -n nuvolaris get wsk/controller -ojsonpath -ojsonpath='{.spec.nuvolaris.password}') ops -login "$OPSDEV_APIHOST" "$OPSDEV_USERNAME" OPSDEV_HOST_PROT="$(echo "$OPSDEV_APIHOST" | awk -F '://' '{print $1}')" @@ -167,7 +167,7 @@ tasks: MONGODB_URL="$(kubectl -n nuvolaris get cm/config -o jsonpath='{.metadata.annotations.mongodb_url}')" {{.RUN}} wsk {{.ETC}} action update hello/mongodb mongodb.js -p mongodb_url "$MONGODB_URL" - "{{.RUN}} wsk {{.ETC}} action invoke hello/mongodb -r | rg 'hello'" - + redis: silent: true desc: redis test @@ -202,7 +202,7 @@ tasks: postgres: silent: true desc: postgres test - cmds: + cmds: - "{{.RUN}} wsk {{.ETC}} package update hello" - | POSTGRES_URL="$(kubectl -n nuvolaris get cm/config -o jsonpath='{.metadata.annotations.postgres_url}')" @@ -210,7 +210,7 @@ tasks: - "{{.RUN}} wsk {{.ETC}} action invoke hello/postgres -r" sleep: - desc: sleep + desc: sleep silent: true cmds: - "{{.RUN}} wsk action update sleep sleep.js --web=true --timeout 300000" @@ -262,9 +262,9 @@ tasks: FLAGS: '{{or .F "--all"}}' env: - APIHOST: + APIHOST: sh: echo "$OPERATOR_CONFIG_HOSTPROTOCOL://$OPERATOR_CONFIG_APIHOST" - HOST: + HOST: sh: echo "$OPERATOR_CONFIG_HOSTPROTOCOL://{{.USR}}.$OPERATOR_CONFIG_APIHOST" cmds: #- test ! -e ~/.ops/{{.USR}}.password || die "User {{.USR}} already exists - check .ops/{{.USR}}.password in your home for password"