diff --git a/README.md b/README.md index d879683..77b8a9f 100644 --- a/README.md +++ b/README.md @@ -26,16 +26,6 @@ Through KubeInvaders you can stress Kubernetes cluster in a fun way and check ho Move the spaceship over a white alien -### Environment Variables - Make the game more difficult to win! - -Set the following variables in Kubernetes Deployment or Openshift DeploymentConfig - -| ENV Var | Description | -|-----------------------------|-------------------------------------------------------------------------------| -| ALIENPROXIMITY (default 15) | Reduce the value to increase distance between aliens | -| HITSLIMIT (default 0) | Seconds of CPU time to wait before shooting | -| UPDATETIME (default 1) | Seconds to wait before update PODs status (you can set also 0.x Es: 0.5) | - ### Install with HELM ``` @@ -46,10 +36,20 @@ kubectl create namespace kubeinvaders helm install kubeinvaders --set-string target_namespace="namespace1\,namespace2" \ --namespace kubeinvaders ./helm-charts/kubeinvaders \ ---set ingress.hostname=kubeinvaders.io +--set ingress.hostName=kubeinvaders.io ``` +### Environment Variables - Make the game more difficult to win! + +Set the following variables in Kubernetes Deployment or Openshift DeploymentConfig + +| ENV Var | Description | +|-----------------------------|-------------------------------------------------------------------------------| +| ALIENPROXIMITY (default 15) | Reduce the value to increase distance between aliens | +| HITSLIMIT (default 0) | Seconds of CPU time to wait before shooting | +| UPDATETIME (default 1) | Seconds to wait before update PODs status (you can set also 0.x Es: 0.5) | + ### Install client on your workstation The easy way to install KubeInvader is run it on you workstation. diff --git a/helm-charts/kubeinvaders/templates/NOTES.txt b/helm-charts/kubeinvaders/templates/NOTES.txt index 83d57ee..a37870b 100644 --- a/helm-charts/kubeinvaders/templates/NOTES.txt +++ b/helm-charts/kubeinvaders/templates/NOTES.txt @@ -1,21 +1,4 @@ Thank you for installing KubeInvaders! {{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "kubeinvaders.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "kubeinvaders.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "kubeinvaders.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "kubeinvaders.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl port-forward $POD_NAME 8080:80 +Visit http://{{ .Values.ingress.hostName }} {{- end }} diff --git a/helm-charts/kubeinvaders/templates/deployment.yaml b/helm-charts/kubeinvaders/templates/deployment.yaml index a85eb63..93bea62 100644 --- a/helm-charts/kubeinvaders/templates/deployment.yaml +++ b/helm-charts/kubeinvaders/templates/deployment.yaml @@ -22,7 +22,7 @@ spec: containers: - env: - name: ROUTE_HOST - value: "{{ .Values.ingress.hostname }}" + value: "{{ .Values.ingress.hostName }}" - name: NAMESPACE value: {{ .Values.target_namespace }} - name: TOKEN diff --git a/helm-charts/kubeinvaders/templates/ingress.yaml b/helm-charts/kubeinvaders/templates/ingress.yaml index 6898b70..fb7358f 100644 --- a/helm-charts/kubeinvaders/templates/ingress.yaml +++ b/helm-charts/kubeinvaders/templates/ingress.yaml @@ -1,3 +1,5 @@ +{{- if .Values.ingress.enabled -}} + apiVersion: extensions/v1beta1 kind: Ingress metadata: @@ -14,13 +16,14 @@ metadata: spec: tls: - hosts: - - {{ .Values.ingress.hostname | quote }} + - {{ .Values.ingress.hostName | quote }} secretName: {{ .Values.ingress.secretName }} rules: - - host: {{ .Values.ingress.hostname }} + - host: {{ .Values.ingress.hostName }} http: paths: - path: / backend: serviceName: kubeinvaders servicePort: 8080 +{{- end }} diff --git a/helm-charts/kubeinvaders/values.yaml b/helm-charts/kubeinvaders/values.yaml index 90d6c7f..d528ebf 100644 --- a/helm-charts/kubeinvaders/values.yaml +++ b/helm-charts/kubeinvaders/values.yaml @@ -40,9 +40,9 @@ ingress: enabled: true annotations: nginx.ingress.kubernetes.io/ssl-redirect: "true" - hostName: + hostName: kubeinvaders.local tls: - + # secretName: kubeinvaders.local resources: {} # We usually recommend not to specify default resources and to leave this as a conscious diff --git a/helm-charts/kubeinvaderss-0.2.8.tar.gz b/helm-charts/kubeinvaderss-0.2.8.tar.gz new file mode 100644 index 0000000..8df2c9c Binary files /dev/null and b/helm-charts/kubeinvaderss-0.2.8.tar.gz differ