Skip to content

Commit

Permalink
chore: rename cloudserver-front to cloudserver
Browse files Browse the repository at this point in the history
  • Loading branch information
Salim committed Jul 20, 2018
1 parent 295fa42 commit 2a45878
Show file tree
Hide file tree
Showing 28 changed files with 79 additions and 79 deletions.
24 changes: 12 additions & 12 deletions charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Then, assuming you have an ingress controller running, run something like:
```shell
$ helm install --name zenko --set ingress.enabled=true \
--set ingress.hosts[0]=zenko.local \
--set cloudserver-front.endpoint=zenko.local zenko
--set cloudserver.endpoint=zenko.local zenko
```

You can disable integration with the [Orbit] management UI (enabled by default).
Expand All @@ -43,19 +43,19 @@ See `values.yml` for more options.
To disable Orbit, use:

```shell
--set cloudserver-front.orbit.enabled=false
--set cloudserver.orbit.enabled=false
```

If a custom Orbit endpoint is required, use:

```shell
--set cloudserver-front.orbit.endpoint=https://custom.orbit.endpoint
--set cloudserver-front.orbit.pushEndpoint=https://custom.push.orbit.endpoint
--set cloudserver.orbit.endpoint=https://custom.orbit.endpoint
--set cloudserver.orbit.pushEndpoint=https://custom.push.orbit.endpoint
```

and if `poll` mode is needed, use:
```shell
--set cloudserver-front.orbit.mode=poll
--set cloudserver.orbit.mode=poll
```

**Note:** `poll` mode should only be used when long-lived websocket connections
Expand All @@ -71,20 +71,20 @@ Autoscaling
-----------

This chart can be configured to deploy a `HorizontalPodAutoscaler` for
`cloudserver-front`. This is disabled by default.
`cloudserver`. This is disabled by default.

To set up autoscaling based on CPU consumption, configure the amount of CPU a
single `cloudserver-front` Pod requests. For example, to request one CPU to be
single `cloudserver` Pod requests. For example, to request one CPU to be
allocated:

```shell
--set cloudserver-front.resources.requests.cpu=1
--set cloudserver.resources.requests.cpu=1
```

Next, enable autoscaling using:

```shell
--set cloudserver-front.autoscaling.enabled=true
--set cloudserver.autoscaling.enabled=true
```

This scales up (and down) between 1 and 16 replicas, with 80% CPU
Expand All @@ -93,9 +93,9 @@ consumption as the per-Pod target.
These defaults can be modified using:

```shell
--set cloudserver-front.autoscaling.config.minReplicas=...
--set cloudserver-front.autoscaling.config.maxReplicas==...
--set cloudserver-front.autoscaling.config.targetCPUUtilizationPercentage=...
--set cloudserver.autoscaling.config.minReplicas=...
--set cloudserver.autoscaling.config.maxReplicas==...
--set cloudserver.autoscaling.config.targetCPUUtilizationPercentage=...
```

Prometheus Monitoring
Expand Down
4 changes: 2 additions & 2 deletions charts/backbeat/templates/api/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
- name: KAFKA_HOSTS
value: "{{- printf "%s-zenko-queue:9092" .Release.Name | trunc 63 | trimSuffix "-" -}}"
- name: EXTENSIONS_REPLICATION_SOURCE_S3_HOST
value: "{{- printf "%s-cloudserver-front" .Release.Name | trunc 63 | trimSuffix "-" -}}"
value: "{{- printf "%s-cloudserver" .Release.Name | trunc 63 | trimSuffix "-" -}}"
- name: EXTENSIONS_REPLICATION_SOURCE_S3_PORT
value: "80"
- name: REDIS_HOST
Expand All @@ -49,7 +49,7 @@ spec:
- name: EXTENSIONS_REPLICATION_SOURCE_AUTH_ACCOUNT
value: service-replication
- name: EXTENSIONS_REPLICATION_DEST_BOOTSTRAPLIST
value: "{{- printf "%s-cloudserver-front:80" .Release.Name | trunc 63 | trimSuffix "-" -}}"
value: "{{- printf "%s-cloudserver:80" .Release.Name | trunc 63 | trimSuffix "-" -}}"
- name: MONGODB_HOSTS
value: "{{ template "backbeat.mongodb-hosts" . }}"
livenessProbe:
Expand Down
2 changes: 1 addition & 1 deletion charts/backbeat/templates/gc/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- name: EXTENSIONS_GC_AUTH_ACCOUNT
value: service-gc
- name: S3_HOST
value: "{{- printf "%s-cloudserver-front" .Release.Name | trunc 63 | trimSuffix "-" -}}"
value: "{{- printf "%s-cloudserver" .Release.Name | trunc 63 | trimSuffix "-" -}}"
- name: S3_PORT
value: "80"
- name: MONGODB_HOSTS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- name: MONGODB_HOSTS
value: "{{ template "backbeat.mongodb-hosts" . }}"
- name: S3_HOST
value: "{{- printf "%s-cloudserver-front" .Release.Name | trunc 63 | trimSuffix "-" -}}"
value: "{{- printf "%s-cloudserver" .Release.Name | trunc 63 | trimSuffix "-" -}}"
- name: S3_PORT
value: "80"
- name: LOG_LEVEL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- name: MONGODB_HOSTS
value: "{{ template "backbeat.mongodb-hosts" . }}"
- name: S3_HOST
value: "{{- printf "%s-cloudserver-front" .Release.Name | trunc 63 | trimSuffix "-" -}}"
value: "{{- printf "%s-cloudserver" .Release.Name | trunc 63 | trimSuffix "-" -}}"
- name: S3_PORT
value: "80"
- name: LOG_LEVEL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ spec:
- name: EXTENSIONS_REPLICATION_SOURCE_AUTH_ACCOUNT
value: service-replication
- name: EXTENSIONS_REPLICATION_SOURCE_S3_HOST
value: "{{- printf "%s-cloudserver-front" .Release.Name | trunc 63 | trimSuffix "-" -}}"
value: "{{- printf "%s-cloudserver" .Release.Name | trunc 63 | trimSuffix "-" -}}"
- name: EXTENSIONS_REPLICATION_SOURCE_S3_PORT
value: "80"
- name: EXTENSIONS_REPLICATION_DEST_AUTH_TYPE
value: service
- name: EXTENSIONS_REPLICATION_DEST_AUTH_ACCOUNT
value: service-replication
- name: EXTENSIONS_REPLICATION_DEST_BOOTSTRAPLIST
value: "{{- printf "%s-cloudserver-front:80" .Release.Name | trunc 63 | trimSuffix "-" -}}"
value: "{{- printf "%s-cloudserver:80" .Release.Name | trunc 63 | trimSuffix "-" -}}"
- name: MONGODB_HOSTS
value: "{{ template "backbeat.mongodb-hosts" . }}"
- name: REDIS_HOST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
- name: EXTENSIONS_REPLICATION_SOURCE_AUTH_ACCOUNT
value: service-replication
- name: EXTENSIONS_REPLICATION_SOURCE_S3_HOST
value: "{{- printf "%s-cloudserver-front" .Release.Name | trunc 63 | trimSuffix "-" -}}"
value: "{{- printf "%s-cloudserver" .Release.Name | trunc 63 | trimSuffix "-" -}}"
- name: EXTENSIONS_REPLICATION_SOURCE_S3_PORT
value: "80"
- name: REDIS_HOST
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
appVersion: "0.1.5"
description: A Helm chart for Kubernetes
name: cloudserver-front
name: cloudserver
version: 0.1.4
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "cloudserver-front.fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "cloudserver.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 svc -w {{ template "cloudserver-front.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "cloudserver-front.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
You can watch the status of by running 'kubectl get svc -w {{ template "cloudserver.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "cloudserver.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={{ template "cloudserver-front.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "cloudserver.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8000 to use your application"
kubectl port-forward $POD_NAME 8000:8000
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- define "cloudserver-front.env" }}
{{- define "cloudserver.env" }}
env:
- name: DATA_HOST
value: "{{- printf "%s-%s" .Release.Name "s3-data" | trunc 63 | trimSuffix "-" -}}"
Expand All @@ -17,7 +17,7 @@ env:
- name: LOG_LEVEL
value: {{ .Values.logging.level }}
- name: ENDPOINT
value: "{{ .Release.Name }}-cloudserver-front,{{ .Values.endpoint }}"
value: "{{ .Release.Name }}-cloudserver,{{ .Values.endpoint }}"
- name: HEALTHCHECKS_ALLOWFROM
value: "{{ .Values.allowHealthchecksFrom }}"
{{- if .Values.storageLimit.enabled }}
Expand Down Expand Up @@ -46,7 +46,7 @@ env:
- name: S3METADATA
value: "mongodb"
- name: MONGODB_HOSTS
value: "{{ template "cloudserver-front.mongodb-hosts" . }}"
value: "{{ template "cloudserver.mongodb-hosts" . }}"
- name: MONGODB_RS
value: "{{ default "rs0" .Values.mongodb.replicaSet }}"
{{- if .Values.orbit.enabled }}
Expand All @@ -62,12 +62,12 @@ env:
- name: SCALITY_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: {{ template "cloudserver-front.fullname" . }}
name: {{ template "cloudserver.fullname" . }}
key: keyId
- name: SCALITY_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ template "cloudserver-front.fullname" . }}
name: {{ template "cloudserver.fullname" . }}
key: secretKey
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "cloudserver-front.name" -}}
{{- define "cloudserver.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

Expand All @@ -11,7 +11,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "cloudserver-front.fullname" -}}
{{- define "cloudserver.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
Expand All @@ -27,14 +27,14 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "cloudserver-front.chart" -}}
{{- define "cloudserver.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create the default mongodb replicaset hosts string
*/}}
{{- define "cloudserver-front.mongodb-hosts" -}}
{{- define "cloudserver.mongodb-hosts" -}}
{{- $count := (atoi (printf "%d" (int64 .Values.mongodb.replicas))) -}}
{{- $release := .Release.Name -}}
{{- range $v := until $count }}{{ $release }}-mongodb-replicaset-{{ $v }}.{{ $release }}-mongodb-replicaset:27017{{ if ne $v (sub $count 1) }},{{- end -}}{{- end -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ template "cloudserver-front.fullname" . }}-proxy
name: {{ template "cloudserver.fullname" . }}-proxy
labels:
app: {{ template "cloudserver-front.name" . }}
chart: {{ template "cloudserver-front.chart" . }}
app: {{ template "cloudserver.name" . }}
chart: {{ template "cloudserver.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
type: Opaque
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "cloudserver-front.fullname" . }}
name: {{ template "cloudserver.fullname" . }}
labels:
app: {{ template "cloudserver-front.name" . }}
chart: {{ template "cloudserver-front.chart" . }}
app: {{ template "cloudserver.name" . }}
chart: {{ template "cloudserver.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "cloudserver-front.name" . }}
app: {{ template "cloudserver.name" . }}
release: {{ .Release.Name }}
template:
metadata:
Expand All @@ -20,7 +20,7 @@ spec:
checksum/config: {{ include (print $.Template.BasePath "/certificate.yaml") . | sha256sum }}
{{- end }}
labels:
app: {{ template "cloudserver-front.name" . }}
app: {{ template "cloudserver.name" . }}
release: {{ .Release.Name }}
spec:
containers:
Expand All @@ -30,7 +30,7 @@ spec:
ports:
- name: http
containerPort: 8000
{{ include "cloudserver-front.env" . | indent 10 }}
{{ include "cloudserver.env" . | indent 10 }}
- name: MANAGEMENT_MODE
value: "{{- .Values.orbit.workerMode -}}"
{{- range $key, $value := .Values.env }}
Expand Down Expand Up @@ -66,5 +66,5 @@ spec:
{{- if .Values.proxy.caCert }}
- name: proxy-cert
secret:
secretName: {{ template "cloudserver-front.fullname" . }}-proxy
secretName: {{ template "cloudserver.fullname" . }}-proxy
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "cloudserver-front.fullname" . }}
name: {{ template "cloudserver.fullname" . }}
labels:
app: {{ template "cloudserver-front.name" . }}
app: {{ template "cloudserver.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: {{ template "cloudserver-front.fullname" . }}
name: {{ template "cloudserver.fullname" . }}
{{ toYaml .Values.autoscaling.config | indent 2 }}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "cloudserver-front.fullname" . -}}
{{- $fullName := include "cloudserver.fullname" . -}}
{{- $servicePort := .Values.service.port -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "cloudserver-front.name" . }}
chart: {{ template "cloudserver-front.chart" . }}
app: {{ template "cloudserver.name" . }}
chart: {{ template "cloudserver.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "cloudserver-front.fullname" . }}-manager
name: {{ template "cloudserver.fullname" . }}-manager
labels:
app: {{ template "cloudserver-front.name" . }}
chart: {{ template "cloudserver-front.chart" . }}
app: {{ template "cloudserver.name" . }}
chart: {{ template "cloudserver.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ template "cloudserver-front.name" . }}
app: {{ template "cloudserver.name" . }}
release: {{ .Release.Name }}
template:
metadata:
Expand All @@ -21,7 +21,7 @@ spec:
checksum/config: {{ include (print $.Template.BasePath "/certificate.yaml") . | sha256sum }}
{{- end }}
labels:
app: {{ template "cloudserver-front.name" . }}
app: {{ template "cloudserver.name" . }}
release: {{ .Release.Name }}
spec:
containers:
Expand All @@ -31,7 +31,7 @@ spec:
ports:
- name: http
containerPort: 8000
{{ include "cloudserver-front.env" . | indent 10 }}
{{ include "cloudserver.env" . | indent 10 }}
- name: MANAGEMENT_MODE
value: "{{- .Values.orbit.managerMode -}}"
{{- range $key, $value := .Values.env }}
Expand Down Expand Up @@ -67,6 +67,6 @@ spec:
{{- if .Values.proxy.caCert }}
- name: proxy-cert
secret:
secretName: {{ template "cloudserver-front.fullname" . }}-proxy
secretName: {{ template "cloudserver.fullname" . }}-proxy
{{- end }}
{{- end}}
Loading

0 comments on commit 2a45878

Please sign in to comment.