-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
working baseline of minimal tinkerbell chart without lb
- Loading branch information
1 parent
b4fe5f7
commit ce84a0e
Showing
13 changed files
with
198 additions
and
440 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
chart/tinkerbell-stack/dependency_charts/smee/templates/nginx-configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# The NGINX ConfigMap is in a separate file because its checksum is used to trigger updates in | ||
# the deployment. | ||
{{ if .Values.deploy -}} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: nginx-conf | ||
namespace: {{ .Release.Namespace | quote }} | ||
data: | ||
nginx.conf: | | ||
worker_processes 1; | ||
events { | ||
worker_connections 1024; | ||
} | ||
user root; | ||
http { | ||
server { | ||
listen 50061; | ||
location / { | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
resolver $POD_NAMESERVER; | ||
set $hegel_dns hegel.{{ .Release.Namespace }}.svc.cluster.local.; # needed in Kubernetes for dynamic DNS resolution | ||
proxy_pass http://$hegel_dns:50061; | ||
} | ||
} | ||
server { | ||
listen 42113; | ||
http2 on; | ||
location / { | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
resolver $POD_NAMESERVER; | ||
set $tink_dns tink-server.{{ .Release.Namespace }}.svc.cluster.local.; # needed in Kubernetes for dynamic DNS resolution | ||
grpc_pass grpc://$tink_dns:42113; | ||
} | ||
} | ||
server { | ||
listen 8080; | ||
location / { | ||
sendfile on; | ||
sendfile_max_chunk 1m; | ||
root /usr/share/nginx/html; | ||
} | ||
} | ||
} | ||
{{- end }} |
87 changes: 87 additions & 0 deletions
87
chart/tinkerbell-stack/dependency_charts/smee/templates/nginx-deploy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{{- if .Values.deploy }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: {{ .Values.name }}-nginx | ||
name: {{ .Values.name }}-nginx | ||
namespace: {{ .Release.Namespace | quote }} | ||
spec: | ||
replicas: {{ .Values.replicas }} | ||
selector: | ||
matchLabels: | ||
app: {{ .Values.name }}-nginx | ||
stack: tinkerbell | ||
{{- with .Values.selector }} | ||
{{- toYaml . | nindent 6 }} | ||
{{- end }} | ||
strategy: | ||
type: {{ .Values.deployment.strategy.type }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Values.name }}-nginx | ||
stack: tinkerbell | ||
{{- with .Values.selector }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
affinity: | ||
podAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- labelSelector: | ||
matchExpressions: | ||
- key: app | ||
operator: In | ||
values: | ||
- {{ .Values.name }} | ||
containers: | ||
- name: {{ .Values.name }}-nginx | ||
image: {{ .Values.nginxImage }} | ||
command: ["/bin/bash", "-xeuc"] | ||
args: | ||
- | | ||
POD_NAMESERVER=$(awk '/nameserver/ {print $2}' /etc/resolv.conf) \ | ||
envsubst '$POD_NAMESERVER' \ | ||
</tmp/nginx.conf.template \ | ||
>/etc/nginx/nginx.conf | ||
exec nginx -g 'daemon off;' | ||
ports: | ||
- containerPort: 50061 | ||
hostPort: 50061 | ||
protocol: TCP | ||
name: hegel-port | ||
- containerPort: 42113 | ||
hostPort: 42113 | ||
protocol: TCP | ||
name: tink-server | ||
- containerPort: 8080 | ||
hostPort: 8080 | ||
protocol: TCP | ||
name: hook-http | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 128Mi | ||
requests: | ||
cpu: 10m | ||
memory: 64Mi | ||
volumeMounts: | ||
- mountPath: /tmp | ||
readOnly: true | ||
name: nginx-conf | ||
- mountPath: /usr/share/nginx/html | ||
name: hook-artifacts | ||
volumes: | ||
- name: nginx-conf | ||
configMap: | ||
name: nginx-conf | ||
items: | ||
- key: nginx.conf | ||
path: nginx.conf.template | ||
- name: hook-artifacts | ||
hostPath: | ||
path: /opt/hook | ||
type: DirectoryOrCreate | ||
serviceAccountName: {{ .Values.name }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,3 +128,4 @@ additionalArgs: [] | |
additionalEnv: [] | ||
trustedProxies: | ||
- "10.42.0.0/24" | ||
nginxImage: nginx:1.25.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.