knative-yaml/serving-default-domain.yaml

101 lines
2.9 KiB
YAML

# 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: "1.11.0"
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: "1.11.0"
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-releases/knative.dev/serving/cmd/default-domain@sha256:2f236e2d9ab1a53939490d54be6b621612e02216f141746b44e64d86b7d32fb1
args: ["-magic-dns=sslip.io"]
ports:
- name: http
containerPort: 8080
readinessProbe:
httpGet:
port: 8080
livenessProbe:
httpGet:
port: 8080
failureThreshold: 6
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 1000m
memory: 1000Mi
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: "1.11.0"
spec:
selector:
app: default-domain
ports:
- name: http
port: 80
targetPort: 8080
type: ClusterIP
---