6 changed files with 130 additions and 0 deletions
@ -0,0 +1,16 @@ |
|||
apiVersion: v2 |
|||
name: hello-world |
|||
description: Aplicação Hello World para teste do Traefik + Gateway API |
|||
|
|||
type: application |
|||
|
|||
# This is the chart version. This version number should be incremented each time you make changes |
|||
# to the chart and its templates, including the app version. |
|||
# Versions are expected to follow Semantic Versioning (https://semver.org/) |
|||
version: 0.1.0 |
|||
|
|||
# This is the version number of the application being deployed. This version number should be |
|||
# incremented each time you make changes to the application. Versions are not expected to |
|||
# follow Semantic Versioning. They should reflect the version the application is using. |
|||
# It is recommended to use it with quotes. |
|||
appVersion: "1.0.0" |
|||
@ -0,0 +1,31 @@ |
|||
apiVersion: apps/v1 |
|||
kind: Deployment |
|||
metadata: |
|||
name: {{ .Release.Name }} |
|||
namespace: {{ .Values.namespace }} |
|||
labels: |
|||
app: {{ .Release.Name }} |
|||
chart: {{ .Chart.Name }}-{{ .Chart.Version }} |
|||
spec: |
|||
replicas: {{ .Values.replicaCount }} |
|||
selector: |
|||
matchLabels: |
|||
app: {{ .Release.Name }} |
|||
template: |
|||
metadata: |
|||
labels: |
|||
app: {{ .Release.Name }} |
|||
spec: |
|||
containers: |
|||
- name: {{ .Release.Name }} |
|||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }} |
|||
imagePullPolicy: {{ .Values.image.pullPolicy }} |
|||
ports: |
|||
- containerPort: {{ .Values.service.targetPort }} |
|||
resources: |
|||
requests: |
|||
cpu: {{ .Values.resources.requests.cpu }} |
|||
memory: {{ .Values.resources.requests.memory }} |
|||
limits: |
|||
cpu: {{ .Values.resources.limits.cpu }} |
|||
memory: {{ .Values.resources.limits.memory }} |
|||
@ -0,0 +1,25 @@ |
|||
apiVersion: gateway.networking.k8s.io/v1 |
|||
kind: HTTPRoute |
|||
metadata: |
|||
name: {{ .Release.Name }} |
|||
namespace: {{ .Values.namespace }} |
|||
labels: |
|||
app: {{ .Release.Name }} |
|||
spec: |
|||
parentRefs: |
|||
- name: {{ .Values.gateway.name }} |
|||
namespace: {{ .Values.gateway.namespace }} |
|||
sectionName: {{ .Values.gateway.listener }} |
|||
{{- if .Values.route.hostname }} |
|||
hostnames: |
|||
- {{ .Values.route.hostname | quote }} |
|||
{{- end }} |
|||
rules: |
|||
- matches: |
|||
- path: |
|||
type: PathPrefix |
|||
value: {{ .Values.route.path }} |
|||
backendRefs: |
|||
- name: {{ .Release.Name }} |
|||
namespace: {{ .Values.namespace }} |
|||
port: {{ .Values.service.port }} |
|||
@ -0,0 +1,4 @@ |
|||
apiVersion: v1 |
|||
kind: Namespace |
|||
metadata: |
|||
name: {{ .Values.namespace }} |
|||
@ -0,0 +1,13 @@ |
|||
apiVersion: v1 |
|||
kind: Service |
|||
metadata: |
|||
name: {{ .Release.Name }} |
|||
namespace: {{ .Values.namespace }} |
|||
labels: |
|||
app: {{ .Release.Name }} |
|||
spec: |
|||
selector: |
|||
app: {{ .Release.Name }} |
|||
ports: |
|||
- port: {{ .Values.service.port }} |
|||
targetPort: {{ .Values.service.targetPort }} |
|||
@ -0,0 +1,41 @@ |
|||
# Namespace onde a aplicação será instalada |
|||
namespace: hello-world |
|||
|
|||
# Configurações do Deployment |
|||
replicaCount: 1 |
|||
|
|||
image: |
|||
repository: nginxdemos/hello |
|||
tag: plain-text |
|||
pullPolicy: IfNotPresent |
|||
|
|||
resources: |
|||
requests: |
|||
cpu: 50m |
|||
memory: 64Mi |
|||
limits: |
|||
cpu: 100m |
|||
memory: 128Mi |
|||
|
|||
# Configurações do Service |
|||
service: |
|||
port: 80 |
|||
targetPort: 80 |
|||
|
|||
# Configurações do Gateway API |
|||
gateway: |
|||
# Nome do Gateway criado pelo _traefik.tpl |
|||
name: internal |
|||
# Namespace onde o Gateway está instalado |
|||
namespace: traefik-internal |
|||
# Listener a usar: http (porta 80) ou https (porta 443) |
|||
listener: http |
|||
|
|||
# Rota HTTP |
|||
route: |
|||
# Deixar vazio para aceitar qualquer host (acesso por IP) |
|||
# Preencher para rotear por hostname: hello.interlegis.leg.br |
|||
hostname: "" |
|||
# Prefixo de path |
|||
path: / |
|||
|
|||
Loading…
Reference in new issue