Closed navidsh closed 5 years ago
Currently the Appsody operator tolerates Knative v0.8.0, this is the version Kabanero will be using, to test the pod starts I conducted the following steps on a OpenShift 4.2 cluster:
kubectl apply --selector knative.dev/crd-install=true \
--filename https://github.com/knative/serving/releases/download/v0.8.0/serving.yaml \
--filename https://github.com/knative/eventing/releases/download/v0.8.0/release.yaml \
--filename https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml
kubectl apply --filename https://github.com/knative/serving/releases/download/v0.8.0/serving.yaml \
--filename https://github.com/knative/eventing/releases/download/v0.8.0/release.yaml \
--filename https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml
As per: https://knative.dev/v0.8-docs/install/knative-with-any-k8s/
kind: Service
metadata:
name: example-appsodyapplication # The name of the app
namespace: randevj # The namespace the app will use
spec:
template:
spec:
containers:
- image: navidsh/demo-day # The URL to the image of the app
env:
- name: TARGET # The environment variable printed out by the sample app
value: "Test Sample"
And then ran the command: oc apply -f service.yaml
to create the Service resource
apiVersion: appsody.dev/v1beta1
kind: AppsodyApplication
metadata:
name: example-appsodyapplication
spec:
# Add fields here
applicationImage: navidsh/demo-day
stack: nodejs-express
createKnativeService: true
service:
type: ClusterIP
port: 3000
expose: true
cat <<-EOF | kubectl apply -f -
apiVersion: v1
kind: Namespace
metadata:
name: knative-serving
---
apiVersion: serving.knative.dev/v1alpha1
kind: KnativeServing
metadata:
name: knative-serving
namespace: knative-serving
spec:
config:
defaults:
revision-timeout-seconds: "300" # 5 minutes
autoscaler:
stable-window: "60s"
deployment:
registriesSkippingTagResolving: "ko.local,dev.local"
logging:
loglevel.controller: "debug"
EOF
As per: https://github.com/knative/serving-operator and https://access.redhat.com/documentation/en-us/openshift_container_platform/4.1/pdf/serverless/OpenShift_Container_Platform-4.1-Serverless-en-US.pdf
apiVersion: appsody.dev/v1beta1
kind: AppsodyApplication
metadata:
name: example-appsodyapplication
spec:
# Add fields here
applicationImage: navidsh/demo-day
stack: nodejs-express
createKnativeService: true
service:
type: ClusterIP
port: 3000
expose: true
Thanks @JusteenR. Closing this one.
As of now, the operator only works with Knative Serving
v1alpha1
. Given that there are newer versions of Knative Serving (v1beta1
andv1
), we need to see if we can change the operator to tolerate newer API versions. This would be a hard requirement once Kabanero installs a newer Knative Serving operator.