forked from Alluxio/alluxio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### What changes are proposed in this pull request? Reactivate pr Alluxio#12165 ### Why are the changes needed? Add proxy templates to helm-chart, in k8s we can use s3 or rest client api by this proxy. ### Does this PR introduce any user facing changes? Please list the user-facing changes introduced by your change, including 1. change in user-facing APIs 2. addition or removal of property keys 3. webui pr-link: Alluxio#14759 change-id: cid-bbb92d2ec41d89c383b46998e1a0690fa094a94a
- Loading branch information
Showing
7 changed files
with
184 additions
and
1 deletion.
There are no files selected for viewing
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 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 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 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 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
98 changes: 98 additions & 0 deletions
98
integration/kubernetes/helm-chart/alluxio/templates/proxy/daemonset.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,98 @@ | ||
# | ||
# The Alluxio Open Foundation licenses this work under the Apache License, version 2.0 | ||
# (the "License"). You may not use this work except in compliance with the License, which is | ||
# available at www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
# either express or implied, as more fully set forth in the License. | ||
# | ||
# See the NOTICE file distributed with this work for information regarding copyright ownership. | ||
# | ||
|
||
{{- if .Values.proxy.enabled }} | ||
{{- $hostNetwork := .Values.proxy.hostNetwork }} | ||
{{- $hostPID := .Values.proxy.hostPID }} | ||
{{- $fullName := include "alluxio.fullname" . }} | ||
|
||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: {{ template "alluxio.fullname" . }}-proxy | ||
labels: | ||
app: {{ template "alluxio.name" . }} | ||
chart: {{ template "alluxio.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
role: alluxio-proxy | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: {{ template "alluxio.name" . }} | ||
chart: {{ template "alluxio.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
role: alluxio-proxy | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ template "alluxio.name" . }} | ||
chart: {{ template "alluxio.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
role: alluxio-proxy | ||
spec: | ||
hostNetwork: {{ $hostNetwork }} | ||
dnsPolicy: {{ .Values.proxy.dnsPolicy | default ($hostNetwork | ternary "ClusterFirstWithHostNet" "ClusterFirst") }} | ||
nodeSelector: | ||
{{- if .Values.proxy.nodeSelector }} | ||
{{ toYaml .Values.proxy.nodeSelector | trim | indent 8 }} | ||
{{- else if .Values.nodeSelector }} | ||
{{ toYaml .Values.nodeSelector | trim | indent 8 }} | ||
{{- end }} | ||
tolerations: | ||
{{- if .Values.proxy.tolerations }} | ||
{{ toYaml .Values.proxy.tolerations | trim | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.tolerations }} | ||
{{ toYaml .Values.tolerations | trim | indent 8 }} | ||
{{- end }} | ||
securityContext: | ||
runAsUser: {{ .Values.user }} | ||
runAsGroup: {{ .Values.group }} | ||
fsGroup: {{ .Values.fsGroup }} | ||
{{- if .Values.proxy.serviceAccount }} | ||
serviceAccountName: {{ .Values.proxy.serviceAccount }} | ||
{{- else if .Values.serviceAccount }} | ||
serviceAccountName: {{ .Values.serviceAccount }} | ||
{{- end }} | ||
{{- if .Values.imagePullSecrets }} | ||
{{ include "alluxio.imagePullSecrets" . | indent 6 }} | ||
{{- end}} | ||
containers: | ||
- name: alluxio-proxy | ||
image: {{ .Values.image }}:{{ .Values.imageTag }} | ||
imagePullPolicy: {{ .Values.imagePullPolicy }} | ||
{{- if .Values.proxy.resources }} | ||
{{ include "alluxio.proxy.resources" . | indent 10 }} | ||
{{- end }} | ||
command: ["/entrypoint.sh"] | ||
{{- if .Values.proxy.args }} | ||
args: | ||
{{ toYaml .Values.proxy.args | trim | indent 12 }} | ||
{{- end }} | ||
env: | ||
{{- range $key, $value := .Values.proxy.env }} | ||
- name: "{{ $key }}" | ||
value: "{{ $value }}" | ||
{{- end }} | ||
- name: ALLUXIO_CLIENT_HOSTNAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP | ||
envFrom: | ||
- configMapRef: | ||
name: {{ $fullName }}-config | ||
ports: | ||
- containerPort: {{ .Values.proxy.ports.web }} | ||
name: web | ||
{{- end }} # proxy enabled |
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