blob: 3e2b632dbc8143a3204b232476b24ad987e2f338 [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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
#
# http://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: v1
kind: Namespace
metadata:
name: trafficserver-test
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: trafficserver-test
name: trafficserver-test
namespace: trafficserver-test
spec:
minReadySeconds: 30
selector:
matchLabels:
app: trafficserver-test
replicas: 1
template:
metadata:
labels:
app: trafficserver-test
spec:
containers:
- name: trafficserver-test
image: ats-ingress:latest # Needs to be updated
# Optional privileged securityContext that can be handy when you need to do debugging
# securityContext:
# privileged: true
volumeMounts:
- mountPath: "/etc/ats/ssl"
name: ats-ssl
readOnly: true
- name: log-trafficserver
mountPath: "/usr/local/var/log/trafficserver"
- name: log-ingress
mountPath: "/usr/local/var/log/ingress"
imagePullPolicy: IfNotPresent
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
# Optional environment variables
# - name: INGRESS_CLASS
# value: "ats"
# - name: LOG_CONFIG_FNAME
# value: "/usr/local/etc/trafficserver/logging.yaml"
# - name: SSL_SERVERNAME_FNAME
# value: "/usr/local/etc/trafficserver/ssl_server_name.yaml"
- name: POD_TLS_PATH
value: "/etc/ats/ssl"
ports:
- containerPort: 80
hostPort: 80
name: http
protocol: TCP
- containerPort: 443
hostPort: 443
name: https
protocol: TCP
- name: log-collector
image: fluent/fluentd:v1.6-debian-1
volumeMounts:
- name: log-trafficserver
mountPath: "/var/log/trafficserver"
- name: log-ingress
mountPath: "/var/log/ingress"
- name: config-volume
mountPath: "/fluentd/etc"
- name: trafficserver-exporter
image: ats-ingress-exporter:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9122
volumes:
- name: ats-ssl
secret:
secretName: tls-secret
- name: log-trafficserver
emptyDir: {}
- name: log-ingress
emptyDir: {}
- name: config-volume
configMap:
name: fluentd-config
---
apiVersion: v1
kind: Service
metadata:
name: trafficserver-test
namespace: trafficserver-test
spec:
type: NodePort
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
nodePort: 30000
- name: https
port: 443
protocol: TCP
targetPort: 443
nodePort: 30043
selector:
app: trafficserver-test