diff --git a/stable/gcloud-endpoints/Chart.yaml b/stable/gcloud-endpoints/Chart.yaml index a87e510866c5..ebc88adf0675 100644 --- a/stable/gcloud-endpoints/Chart.yaml +++ b/stable/gcloud-endpoints/Chart.yaml @@ -1,5 +1,5 @@ name: gcloud-endpoints -version: 0.1.0 +version: 0.2.0 description: Develop, deploy, protect and monitor your APIs with Google Cloud Endpoints. keywords: - google diff --git a/stable/gcloud-endpoints/templates/NOTES.txt b/stable/gcloud-endpoints/templates/NOTES.txt index f501e182d497..0b0da6383bee 100644 --- a/stable/gcloud-endpoints/templates/NOTES.txt +++ b/stable/gcloud-endpoints/templates/NOTES.txt @@ -11,20 +11,20 @@ Google's documentation: https://cloud.google.com/endpoints/docs/quickstart-compu {{- if contains "NodePort" .Values.serviceType }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }}) + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "gcloud-endpoints.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.serviceType }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. - Watch the status with: 'kubectl get svc -w {{ template "fullname" . }}' + Watch the status with: 'kubectl get svc -w {{ template "gcloud-endpoints.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "gcloud-endpoints.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') echo http://$SERVICE_IP/ {{- else if contains "ClusterIP" .Values.serviceType }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}") + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "gcloud-endpoints.fullname" . }}" -o jsonpath="{.items[0].metadata.name}") echo http://127.0.0.1:8080/ kubectl port-forward $POD_NAME 8080:80 {{- end }} diff --git a/stable/gcloud-endpoints/templates/_helpers.tpl b/stable/gcloud-endpoints/templates/_helpers.tpl index db2ea7c87497..4b4e79c71b02 100644 --- a/stable/gcloud-endpoints/templates/_helpers.tpl +++ b/stable/gcloud-endpoints/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "name" -}} +{{- define "gcloud-endpoints.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 24 -}} {{- end -}} @@ -10,17 +10,17 @@ Expand the name of the chart. Create a default fully qualified app name. We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}} -{{- define "fullname" -}} +{{- define "gcloud-endpoints.fullname" -}} {{- $name := default .Chart.Name .Values.nameOverride -}} {{- printf "%s-%s" .Release.Name $name | trunc 24 -}} {{- end -}} -{{- define "toYaml" -}} +{{- define "gcloud-endpoints.toYaml" -}} {{- range $key, $value := . -}} {{- $map := kindIs "map" $value -}} {{- if $map }} {{ $key }}: - {{- include "toYaml" $value | indent 2 }} + {{- include "gcloud-endpoints.toYaml" $value | indent 2 }} {{- else }} {{ $key }}: {{ $value }} {{- end }} diff --git a/stable/gcloud-endpoints/templates/deployment.yaml b/stable/gcloud-endpoints/templates/deployment.yaml index d8b775326247..ce0cb14d7d98 100644 --- a/stable/gcloud-endpoints/templates/deployment.yaml +++ b/stable/gcloud-endpoints/templates/deployment.yaml @@ -1,9 +1,9 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: {{ template "fullname" . }} + name: {{ template "gcloud-endpoints.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "gcloud-endpoints.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" @@ -12,7 +12,7 @@ spec: template: metadata: labels: - app: {{ template "fullname" . }} + app: {{ template "gcloud-endpoints.fullname" . }} spec: containers: - name: endpoints @@ -80,4 +80,4 @@ spec: timeoutSeconds: 1 {{- end }} resources: - {{ include "toYaml" .Values.resources | indent 12 }} + {{ include "gcloud-endpoints.toYaml" .Values.resources | indent 12 }} diff --git a/stable/gcloud-endpoints/templates/service.yaml b/stable/gcloud-endpoints/templates/service.yaml index 4a4ef15bb4eb..4d7f2b46589b 100644 --- a/stable/gcloud-endpoints/templates/service.yaml +++ b/stable/gcloud-endpoints/templates/service.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ template "fullname" . }} + name: {{ template "gcloud-endpoints.fullname" . }} spec: ports: {{- if (.Values.httpPort) }} @@ -28,6 +28,6 @@ spec: name: https {{- end }} selector: - app: {{ template "fullname" . }} + app: {{ template "gcloud-endpoints.fullname" . }} type: {{ .Values.serviceType }} diff --git a/stable/gcloud-endpoints/values.yaml b/stable/gcloud-endpoints/values.yaml index 3cf6bfbce4d2..4d41be2f4abb 100644 --- a/stable/gcloud-endpoints/values.yaml +++ b/stable/gcloud-endpoints/values.yaml @@ -1,6 +1,6 @@ ## Google Cloud Endpoints Runtime image ## ref: https://cloud.google.com/endpoints/docs/quickstart-container-engine#deploying_the_sample_api_to_the_cluster -image: b.gcr.io/endpoints/endpoints-runtime:1 +image: gcr.io/endpoints-release/endpoints-runtime:1 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' @@ -11,18 +11,18 @@ image: b.gcr.io/endpoints/endpoints-runtime:1 ## Set the application server address to which ESP proxies the requests. For ## GRPC backends, please use grpc:// prefix, e.g. grpc://localhost:8081. ## (default: localhost:8081) -## -# backend: +## +# backend: ## Set the name of the Endpoints service. If omitted and serviceConfigURL not ## specified, ESP contacts the metadata service to fetch the service name. ## (default: None) -## -# service: +## +# service: ## Specify the URL to fetch the service configuration. (default: None) ## -# serviceConfigURL: +# serviceConfigURL: ## Expose a port to accept HTTP/1.x connections. Note that if you do not ## specify httpPort, http2Port, and sslPort, then the default httpPort 8080 is @@ -38,7 +38,7 @@ image: b.gcr.io/endpoints/endpoints-runtime:1 ## Expose a port for HTTPS requests. Accepts both HTTP/1.x and HTTP/2 ## connections. (default: None) ## -# sslPort: +# sslPort: ## Set the ESP status port. Status information is available at ## /endpoints_status location over HTTP/1.x. (default: 8090) @@ -49,17 +49,17 @@ statusPort: 8090 ## serviceConfigURL not specified, ESP contacts the metadata service to fetch ## the service version. (default: None) ## -# version: +# version: ## Set the service account key JSON file. Used to access the service control ## and the service management. If the option is omitted, ESP contacts the ## metadata service to fetch an access token. (default: None) ## -# serviceAccountKey: +# serviceAccountKey: ## Set a custom nginx config file. (default: None) ## -# nginxConfig: +# nginxConfig: ## Kubernetes configuration ## For minikube, set this to NodePort, elsewhere use LoadBalancer