Skip to content
Merged
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ see them in the subscriber.
1. In a separate terminal, run the following program to generate events.

```shell
go run github.com/knative/docs/eventing/samples/iot-core/generator \
go run github.com/knative/docs/docs/eventing/samples/iot-core/generator \
-project $IOTCORE_PROJECT \
-region $IOTCORE_REGION \
-registry $IOTCORE_REGISTRY \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
FROM golang AS builder

# copy the source
ADD . /go/src/github.com/knative/docs/serving/samples/gitwebhook-go
WORKDIR /go/src/github.com/knative/docs/serving/samples/gitwebhook-go
ADD . /go/src/github.com/knative/docs/docs/serving/samples/gitwebhook-go
WORKDIR /go/src/github.com/knative/docs/docs/serving/samples/gitwebhook-go

# install dependencies
RUN go get github.com/google/go-github/github
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"log"
"time"

pb "github.com/knative/docs/serving/samples/grpc-ping-go/proto"
pb "github.com/knative/docs/docs/serving/samples/grpc-ping-go/proto"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net"
"time"

ping "github.com/knative/docs/serving/samples/grpc-ping-go/proto"
ping "github.com/knative/docs/docs/serving/samples/grpc-ping-go/proto"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ the Login service.
4. Check out the code:

```
go get -d github.com/knative/docs/serving/samples/knative-routing-go
go get -d github.com/knative/docs/docs/serving/samples/knative-routing-go
```

## Setup
Expand All @@ -54,22 +54,22 @@ Google Cloud Project and to enable the

```
docker build \
--tag "${REPO}/serving/samples/knative-routing-go" \
--tag "${REPO}/docs/serving/samples/knative-routing-go" \
--file=serving/samples/knative-routing-go/Dockerfile .
```

4. Push your container to a container registry:

```
docker push "${REPO}/serving/samples/knative-routing-go"
docker push "${REPO}/docs/serving/samples/knative-routing-go"
```

5. Replace the image reference path with our published image path in the
configuration file `serving/samples/knative-routing-go/sample.yaml`:

- Manually replace:
`image: github.com/knative/docs/serving/samples/knative-routing-go` with
`image: <YOUR_CONTAINER_REGISTRY>/serving/samples/knative-routing-go`
`image: github.com/knative/docs/docs/serving/samples/knative-routing-go` with
`image: <YOUR_CONTAINER_REGISTRY>docs/serving/samples/knative-routing-go`

Or

Expand Down
33 changes: 33 additions & 0 deletions docs/serving/samples/rest-api-go/sample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2018 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: stock-service-example
namespace: default
spec:
runLatest:
configuration:
revisionTemplate:
spec:
container:
image: ${REPO}/rest-api-go
env:
- name: RESOURCE
value: stock
readinessProbe:
httpGet:
path: /
initialDelaySeconds: 0
periodSeconds: 3
35 changes: 35 additions & 0 deletions docs/serving/samples/traffic-splitting/updated_configuration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2019 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: stock-service-example
namespace: default
spec:
release:
revisions: ["${CURRENT}"]
configuration:
revisionTemplate:
spec:
container:
image: ${REPO}/rest-api-go
env:
- name: RESOURCE
value: stock
readinessProbe:
httpGet:
path: /
initialDelaySeconds: 0
periodSeconds: 3
File renamed without changes.
File renamed without changes.