Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Update chart to include redis service #340

Merged
merged 1 commit into from
Aug 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deployment/monocular/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
charts/*.tgz
6 changes: 6 additions & 0 deletions deployment/monocular/requirements.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: redis
repository: https://kubernetes-charts.storage.googleapis.com
version: 0.8.1
digest: sha256:06eaffdfb97b679510a6072b036358e03af85c26afa9bf8eb41b9f21cfd5fca0
generated: 2017-08-16T18:47:21.379793272+01:00
4 changes: 4 additions & 0 deletions deployment/monocular/requirements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dependencies:
- name: redis
version: 0.8.1
repository: https://kubernetes-charts.storage.googleapis.com
8 changes: 8 additions & 0 deletions deployment/monocular/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
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).
*/}}
{{- define "redis.fullname" -}}
{{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
5 changes: 4 additions & 1 deletion deployment/monocular/templates/api-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ metadata:
heritage: "{{ .Release.Service }}"
data:
monocular.yaml: |-
{{ toYaml .Values.api.config | indent 4 }}
{{ toYaml .Values.api.config | indent 4 -}}
redis:
host: {{ template "redis.fullname" . }}:6379

2 changes: 2 additions & 0 deletions deployment/monocular/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ prerender:
requests:
cpu: 100m
memory: 128Mi
redis:
usePassword: false

ingress:
enabled: true
Expand Down
3 changes: 2 additions & 1 deletion scripts/repo-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ install_helm
log "Packaging charts from source code"
pushd $BUILD_DIR
log "Packaging chart"
helm dep build $CHART_PATH
helm package $CHART_PATH

log "Indexing repository"
Expand All @@ -135,4 +136,4 @@ fi

log "Repository cleanup and reset"
git reset --hard upstream/master
git clean -df .
git clean -df .
2 changes: 1 addition & 1 deletion src/api/rootfs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.3
FROM alpine:3.6

RUN apk -U add ca-certificates && \
rm -Rf /var/cache/apk/*
Expand Down
5 changes: 4 additions & 1 deletion src/api/swagger/restapi/configure_monocular.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ func configureAPI(api *operations.MonocularAPI) http.Handler {
}

// configure the api here
data.UpdateCache(conf.Repos)
if err := data.UpdateCache(conf.Repos); err != nil {
log.Fatalf("Can not configure repository cache %v\n", err)
}

chartsImplementation := cache.NewCachedCharts()
// Run foreground repository refresh
chartsImplementation.Refresh()
Expand Down