You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2020/07/31 00:23:55 UTC

[GitHub] [trafficserver-ingress-controller] shukitchan commented on a change in pull request #32: Helm support

shukitchan commented on a change in pull request #32:
URL: https://github.com/apache/trafficserver-ingress-controller/pull/32#discussion_r463340107



##########
File path: charts/TODO.md
##########
@@ -0,0 +1,24 @@
+# TODO for Helm support
+Helm support for ATS Ingress Controller is still under development and can only be used locally after building the following docker images:
+- ats_alpine
+- tsexporter
+
+After building the above images, do the following to install ATS Ingress using Helm:
+1. `$ kubectl create namespace trafficserver-test`
+    - Create the namespace where the ingress controller will be installed
+2. `$ helm install charts/ats-ingress --generate-name -n trafficserver-test`
+    - Use helm install to install the chart specifying the namespace created in step one
+
+To install the ingress controller with TLS support, create a file named `override.yaml` which contains the following two values:
+```yaml
+tls:
+    crt: <TLS certificate>
+    key: <TLS key>
+```
+and then:
+`$ helm install -f override.yaml charts/ats-ingress --generate-name -n trafficserver-test`
+
+## TODO for enabling Helm
+- [ ] Upload ats_alpine docker image to a public repository and replace `image.repository` value in values.yaml
+- [ ] Upload trafficserver-exporter docker image to a public repository and make the corresponding changes in `.Values.ats.exporter.name`

Review comment:
       I don't understand this part. The image of the tsexporter is fixed, though. 
   Should it follow the example with ats_alpine ? 
   Why do we need to change the "exporter.name" ? in values.yaml, i assume ?

##########
File path: charts/TODO.md
##########
@@ -0,0 +1,24 @@
+# TODO for Helm support
+Helm support for ATS Ingress Controller is still under development and can only be used locally after building the following docker images:
+- ats_alpine
+- tsexporter
+
+After building the above images, do the following to install ATS Ingress using Helm:
+1. `$ kubectl create namespace trafficserver-test`

Review comment:
       Let's use a different namespace

##########
File path: charts/ats-ingress/templates/deployment.yaml
##########
@@ -0,0 +1,88 @@
+#  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: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "ats-ingress.fullname" . }}
+  namespace: {{ .Release.Namespace }}
+  labels:
+    {{- include "ats-ingress.labels" . | nindent 4 }}
+spec:
+  minReadySeconds: 30
+
+  # DO NOT EXCEED ONE COPY
+  replicas: 1
+  # DO NOT EXCEED ONE COPY
+
+  selector:
+    matchLabels:
+      {{- include "ats-ingress.selectorLabels" . | nindent 6 }}
+  template:
+    metadata:
+      labels:
+        {{- include "ats-ingress.selectorLabels" . | nindent 8 }}
+    spec:
+      containers:
+        - name: {{ .Chart.Name }}
+          image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          volumeMounts:
+            - mountPath: {{ .Values.ats.ssl.path | quote }} 
+              name: {{ .Values.ats.ssl.name }}
+              readOnly: true
+            - name: varlog
+              mountPath: {{ .Values.ats.log.dir }}
+          env:
+            - name: POD_NAME
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.name
+            - name: POD_NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+            - name: POD_TLS_PATH
+              value: {{ .Values.ats.ssl.path | quote }} 
+          ports:
+          - containerPort: 80
+            hostPort: 80
+            name: http
+            protocol: TCP
+          - containerPort: 443
+            hostPort: 443
+            name: https
+            protocol: TCP
+        - name: {{ .Values.collector.name }}
+          image: fluent/fluentd:v1.6-debian-1
+          volumeMounts:
+          - name: varlog
+            mountPath: {{ .Values.collector.path | quote }}
+          - name: config-volume
+            mountPath: {{ .Values.collector.fluentdConfigPath | quote }}
+        - name: {{ .Values.ats.exporter.name }}
+          image: tsexporter:latest

Review comment:
       this is hardcoded and fine ?
   while the ats_alpine image is a valuable ?

##########
File path: charts/TODO.md
##########
@@ -0,0 +1,24 @@
+# TODO for Helm support
+Helm support for ATS Ingress Controller is still under development and can only be used locally after building the following docker images:
+- ats_alpine
+- tsexporter
+
+After building the above images, do the following to install ATS Ingress using Helm:
+1. `$ kubectl create namespace trafficserver-test`
+    - Create the namespace where the ingress controller will be installed
+2. `$ helm install charts/ats-ingress --generate-name -n trafficserver-test`
+    - Use helm install to install the chart specifying the namespace created in step one
+
+To install the ingress controller with TLS support, create a file named `override.yaml` which contains the following two values:
+```yaml
+tls:
+    crt: <TLS certificate>
+    key: <TLS key>
+```
+and then:
+`$ helm install -f override.yaml charts/ats-ingress --generate-name -n trafficserver-test`
+
+## TODO for enabling Helm
+- [ ] Upload ats_alpine docker image to a public repository and replace `image.repository` value in values.yaml
+- [ ] Upload trafficserver-exporter docker image to a public repository and make the corresponding changes in `.Values.ats.exporter.name`
+- [ ] Host the helm chart on either your own server or a public server so that users don't need to clone the repo to use helm for installation

Review comment:
       Can you elaborate a bit on the hosting of helm chart ? 
   Do we host the whole directory ?
   Please give an example. e.g. I have https://www.example.com/ 
   Where should the helm files be under this domain ?
   
   And also what would be the helm command to run after that ?
   
   Also please provide some examples of public server we can use for the hosting. There are a few you showed me? 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org