diff --git a/.github/workflows/move2kube-e2e.yaml b/.github/workflows/move2kube-e2e.yaml index 11f6df92..620d5158 100644 --- a/.github/workflows/move2kube-e2e.yaml +++ b/.github/workflows/move2kube-e2e.yaml @@ -97,15 +97,17 @@ jobs: kubectl patch configmap/m2k-props \ --type merge \ - -p '{"data": {"application.properties" :"move2kube_url=http://move2kube-instance-svc.default.svc.cluster.local:8080\nquarkus.rest-client.move2kube_yaml.url=http://move2kube-instance-svc.default.svc.cluster.local:8080\nquarkus.rest-client.notifications_yaml.url=http://janus-idp-workflows-backstage.default.svc.cluster.local:7007/api/notifications/"}}' + -p '{"data": {"application.properties" :"move2kube_url=http://move2kube-instance-svc.default.svc.cluster.local:8080\nquarkus.rest-client.move2kube_yaml.url=http://move2kube-instance-svc.default.svc.cluster.local:8080\nquarkus.rest-client.notifications.url=http://janus-idp-workflows-backstage.default.svc.cluster.local:7007/api/notifications/"}}' kubectl delete pod -l "app=m2k" kubectl get pods -o wide + - name: Deploy Knative function run: | ###### workaround till https://issues.redhat.com/browse/FLPATH-892 is solved - yq --inplace '.spec.podTemplate.container |= ( . + {"imagePullPolicy": "IfNotPresent"} )' e2e/resources/knative-resources.yaml + yq --inplace '.spec.template.spec.containers[0] |= ( . + {"imagePullPolicy": "IfNotPresent"} )' e2e/resources/knative-service.yaml ###### end workaround # deploy the manifests created by the ${{ steps.build-image.outputs.image }}" + kubectl apply -f e2e/resources/knative-service.yaml kubectl apply -f e2e/resources/knative-resources.yaml kubectl wait ksvc m2k-save-transformation-func --for=condition=Ready=true --timeout=5m diff --git a/e2e/resources/knative-resources.yaml b/e2e/resources/knative-resources.yaml index e5cdbdb6..c6e61fe2 100644 --- a/e2e/resources/knative-resources.yaml +++ b/e2e/resources/knative-resources.yaml @@ -38,68 +38,6 @@ metadata: name: default namespace: sonataflow-infra --- -apiVersion: serving.knative.dev/v1 -kind: Service -metadata: - name: m2k-save-transformation-func -spec: - template: - metadata: - name: m2k-save-transformation-func-v1 - spec: - initContainers: - - name: volume-mount-hack - image: busybox - securityContext: - runAsUser: 0 - allowPrivilegeEscalation: true - command: [ "sh", "-c", "cp /tmp/.ssh/id_rsa /etc/pre-install/. && chown 185 /etc/pre-install/id_rsa" ] - volumeMounts: - - name: ssh-priv-key - mountPath: "/tmp/.ssh/id_rsa" - subPath: id_rsa - readOnly: true - - name: pre-install - mountPath: /etc/pre-install - containers: - - image: quay.io/orchestrator/serverless-workflow-m2k-kfunc:latest - imagePullPolicy: Always - env: - - name: EXPORTED_FUNC - value: saveTransformation - - name: SSH_PRIV_KEY_PATH - value: /home/jboss/.ssh/id_rsa - - name: BROKER_URL - value: http://broker-ingress.knative-eventing.svc.cluster.local/sonataflow-infra/default - - name: MOVE2KUBE_API - value: http://move2kube-instance-svc.default.svc.cluster.local:8080/api/v1 - name: user-container - volumeMounts: - - name: pre-install - readOnly: true - mountPath: "/home/jboss/.ssh/id_rsa" - subPath: id_rsa - - name: ssh-pub-key - readOnly: true - mountPath: "/home/jboss/.ssh/id_rsa.pub" - subPath: id_rsa.pub - - readinessProbe: - successThreshold: 1 - tcpSocket: - port: 0 - volumes: - - name: ssh-priv-key - secret: - secretName: sshkeys - defaultMode: 384 - - name: ssh-pub-key - secret: - secretName: sshkeys - - name: pre-install - emptyDir: { } - ---- apiVersion: eventing.knative.dev/v1 kind: Trigger metadata: diff --git a/e2e/resources/knative-service.yaml b/e2e/resources/knative-service.yaml new file mode 100644 index 00000000..52f4e2bf --- /dev/null +++ b/e2e/resources/knative-service.yaml @@ -0,0 +1,62 @@ +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + name: m2k-save-transformation-func +spec: + template: + metadata: + name: m2k-save-transformation-func-v1 + spec: + initContainers: + - name: volume-mount-hack + image: busybox + securityContext: + runAsUser: 0 + allowPrivilegeEscalation: true + command: + - sh + - -c + - cp /tmp/.ssh/id_rsa /etc/pre-install/. && chown 185 /etc/pre-install/id_rsa + volumeMounts: + - name: ssh-priv-key + mountPath: /tmp/.ssh/id_rsa + subPath: id_rsa + readOnly: true + - name: pre-install + mountPath: /etc/pre-install + containers: + - image: quay.io/orchestrator/serverless-workflow-m2k-kfunc:latest + imagePullPolicy: IfNotPresent + env: + - name: EXPORTED_FUNC + value: saveTransformation + - name: SSH_PRIV_KEY_PATH + value: /home/jboss/.ssh/id_rsa + - name: BROKER_URL + value: http://broker-ingress.knative-eventing.svc.cluster.local/sonataflow-infra/default + - name: MOVE2KUBE_API + value: http://move2kube-instance-svc.default.svc.cluster.local:8080/api/v1 + name: user-container + volumeMounts: + - name: pre-install + readOnly: true + mountPath: /home/jboss/.ssh/id_rsa + subPath: id_rsa + - name: ssh-pub-key + readOnly: true + mountPath: /home/jboss/.ssh/id_rsa.pub + subPath: id_rsa.pub + readinessProbe: + successThreshold: 1 + tcpSocket: + port: 0 + volumes: + - name: ssh-priv-key + secret: + secretName: sshkeys + defaultMode: 384 + - name: ssh-pub-key + secret: + secretName: sshkeys + - name: pre-install + emptyDir: {}