Skip to content

Instantly share code, notes, and snippets.

@naveenrajm7
Last active March 18, 2023 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naveenrajm7/0b8f36752b0246ac680913580a756ed0 to your computer and use it in GitHub Desktop.
Save naveenrajm7/0b8f36752b0246ac680913580a756ed0 to your computer and use it in GitHub Desktop.
K0s knative serving default domain
# 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: batch/v1
kind: Job
metadata:
name: default-domain
namespace: knative-serving
labels:
app: "default-domain"
app.kubernetes.io/component: default-domain-job
app.kubernetes.io/name: knative-serving
app.kubernetes.io/version: "20230317-f031fd4e1"
spec:
template:
metadata:
annotations:
sidecar.istio.io/inject: "false"
labels:
app: "default-domain"
app.kubernetes.io/component: default-domain-job
app.kubernetes.io/name: knative-serving
app.kubernetes.io/version: "20230317-f031fd4e1"
spec:
serviceAccountName: controller
containers:
- name: default-domain
# This is the Go import path for the binary that is containerized
# and substituted here.
image: gcr.io/knative-nightly/knative.dev/serving/cmd/default-domain@sha256:48f8e002f76259a2306777a1574c39bac2709158267c145c85d0c7329063e821
args: ["-magic-dns=sslip.io"]
ports:
- name: http
containerPort: 8080
readinessProbe:
httpGet:
port: 8080
livenessProbe:
httpGet:
port: 8080
failureThreshold: 6
resources:
requests:
cpu: 50m
memory: 50Mi
limits:
cpu: 500m
memory: 500Mi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: SYSTEM_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
restartPolicy: Never
backoffLimit: 10
---
apiVersion: v1
kind: Service
metadata:
name: default-domain-service
namespace: knative-serving
labels:
app: default-domain
app.kubernetes.io/component: default-domain-job
app.kubernetes.io/name: knative-serving
app.kubernetes.io/version: "20230317-f031fd4e1"
spec:
selector:
app: default-domain
ports:
- name: http
port: 80
targetPort: 8080
type: ClusterIP
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment