Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

WIP: Get the demo working on OCP4 #30

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions knative-kubecon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ spec:
containerConcurrency: 1
container:
imagePullPolicy: Always
image: docker-registry.default.svc:5000/myproject/dumpy:latest
image: image-registry.openshift-image-registry.svc:5000/myproject/dumpy:latest
```

It's very apparent that the `spec.runLatest.configuration.build` part is a one-to-one copy of the Build
Expand Down Expand Up @@ -268,7 +268,8 @@ servicemesh, which is listening on `$(minishift ip):32380`). Stringed together w
command:

```bash
$ curl -H "Host: dumpy.myproject.example.com" "http://$(minishift ip):32380/health"
$ IP=$(oc get -n istio-system service istio-ingressgateway -ojsonpath='{.status.loadBalancer.ingress[0].hostname}')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we guaranteed to have a hostname set here for every OCP4 environment? Usually scripts branch between either ip or hostname (whatever is set).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, actually. On the only supported platform (AWS), I expect so. But I agree we can probably do this bettererer

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should do better! We should get real DNS here and not a host header.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easy enough on a shared cloud. I hate to ignore the local cluster peeps, though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this issue is about OCP4, so we can assume AWS somewhere for now perhaps?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An OpenShift Route with dumpy.myproject.<my ocp cluster domain> and an edit to Knative's config-network to change the domain from example.com to <my ocp cluster domain>?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be fine getting in as is. We need to find the sequence of commands to make things externally available on OCP4 anyway, we can probably augment that in a subsequent PR if we want to.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

$ curl -H "Host: dumpy.myproject.example.com" "http://$IP/health"

888 888 888
888 888 888
Expand Down
9 changes: 0 additions & 9 deletions knative-kubecon/eventing/010-channel.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
apiVersion: eventing.knative.dev/v1alpha1
kind: Subscription
kind: Trigger
metadata:
name: testevents-subscription
name: my-service-trigger
namespace: myproject
spec:
channel:
apiVersion: eventing.knative.dev/v1alpha1
kind: Channel
name: testchannel
filter:
sourceAndType:
type: dev.knative.eventing.samples.heartbeat
subscriber:
ref:
apiVersion: serving.knative.dev/v1alpha1
Expand Down
7 changes: 4 additions & 3 deletions knative-kubecon/eventing/021-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ apiVersion: sources.eventing.knative.dev/v1alpha1
kind: ContainerSource
metadata:
name: heartbeat-event-source
namespace: myproject
spec:
image: docker.io/matzew/kube-heartbeat
image: quay.io/openshift-knative/knative-eventing-sources-heartbeats:v0.5.0
args:
- '--label="<3"'
- '--period=400'
sink:
apiVersion: eventing.knative.dev/v1alpha1
kind: Channel
name: testchannel
kind: Broker
name: default
6 changes: 5 additions & 1 deletion knative-kubecon/serving/010-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ spec:
alpha.image.policy.openshift.io/resolve-names: "*"
spec:
containerConcurrency: 1
timeoutSeconds: 60
container:
imagePullPolicy: Always
image: docker-registry.default.svc:5000/myproject/dumpy:latest
image: image-registry.openshift-image-registry.svc:5000/myproject/dumpy:latest
resources:
requests:
cpu: 50m
6 changes: 5 additions & 1 deletion knative-kubecon/serving/011-service-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ spec:
alpha.image.policy.openshift.io/resolve-names: "*"
spec:
containerConcurrency: 1
timeoutSeconds: 60
container:
imagePullPolicy: Always
image: docker-registry.default.svc:5000/myproject/dumpy:latest
image: image-registry.openshift-image-registry.svc:5000/myproject/dumpy:latest
resources:
requests:
cpu: 50m
6 changes: 5 additions & 1 deletion knative-kubecon/serving/012-service-traffic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ spec:
alpha.image.policy.openshift.io/resolve-names: "*"
spec:
containerConcurrency: 1
timeoutSeconds: 60
container:
imagePullPolicy: Always
image: docker-registry.default.svc:5000/myproject/dumpy:latest
image: image-registry.openshift-image-registry.svc:5000/myproject/dumpy:latest
resources:
requests:
cpu: 50m
6 changes: 5 additions & 1 deletion knative-kubecon/serving/013-service-final.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ spec:
alpha.image.policy.openshift.io/resolve-names: "*"
spec:
containerConcurrency: 1
timeoutSeconds: 60
container:
imagePullPolicy: Always
image: docker-registry.default.svc:5000/myproject/dumpy:latest
image: image-registry.openshift-image-registry.svc:5000/myproject/dumpy:latest
resources:
requests:
cpu: 50m