Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Rename service port to http (#4442)
Browse files Browse the repository at this point in the history
* Rename service port to http

* Remove dependency from common chart

* Added keywords for Chart.yaml
  • Loading branch information
goruha authored and k8s-ci-robot committed Mar 23, 2018
1 parent 2273a79 commit 978daf5
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 22 deletions.
6 changes: 5 additions & 1 deletion incubator/chartmuseum/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
apiVersion: v1
description: Helm Chart Repository with support for Amazon S3 and Google Cloud Storage
name: chartmuseum
version: 0.4.4
version: 0.4.5
appVersion: 0.4.2
home: https://github.com/chartmuseum/chartmuseum
icon: https://raw.githubusercontent.com/chartmuseum/chartmuseum/master/logo.png
keywords:
- chartmuseum
- helm
- charts repo
maintainers:
- name: ChartMuseum
email: chartmuseum@gmail.com
Expand Down
4 changes: 0 additions & 4 deletions incubator/chartmuseum/requirements.yaml

This file was deleted.

84 changes: 84 additions & 0 deletions incubator/chartmuseum/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{{- /*
name defines a template for the name of the chartmuseum chart.
The prevailing wisdom is that names should only contain a-z, 0-9 plus dot (.) and dash (-), and should
not exceed 63 characters.
Parameters:
- .Values.nameOverride: Replaces the computed name with this given name
- .Values.namePrefix: Prefix
- .Values.global.namePrefix: Global prefix
- .Values.nameSuffix: Suffix
- .Values.global.nameSuffix: Global suffix
The applied order is: "global prefix + prefix + name + suffix + global suffix"
Usage: 'name: "{{- template "chartmuseum.name" . -}}"'
*/ -}}
{{- define "chartmuseum.name"}}
{{- $global := default (dict) .Values.global -}}
{{- $base := default .Chart.Name .Values.nameOverride -}}
{{- $gpre := default "" $global.namePrefix -}}
{{- $pre := default "" .Values.namePrefix -}}
{{- $suf := default "" .Values.nameSuffix -}}
{{- $gsuf := default "" $global.nameSuffix -}}
{{- $name := print $gpre $pre $base $suf $gsuf -}}
{{- $name | lower | trunc 54 | trimSuffix "-" -}}
{{- end -}}

{{- /*
fullname defines a suitably unique name for a resource by combining
the release name and the chartmuseum chart name.
The prevailing wisdom is that names should only contain a-z, 0-9 plus dot (.) and dash (-), and should
not exceed 63 characters.
Parameters:
- .Values.fullnameOverride: Replaces the computed name with this given name
- .Values.fullnamePrefix: Prefix
- .Values.global.fullnamePrefix: Global prefix
- .Values.fullnameSuffix: Suffix
- .Values.global.fullnameSuffix: Global suffix
The applied order is: "global prefix + prefix + name + suffix + global suffix"
Usage: 'name: "{{- template "chartmuseum.fullname" . -}}"'
*/ -}}
{{- define "chartmuseum.fullname"}}
{{- $global := default (dict) .Values.global -}}
{{- $base := default (printf "%s-%s" .Release.Name .Chart.Name) .Values.fullnameOverride -}}
{{- $gpre := default "" $global.fullnamePrefix -}}
{{- $pre := default "" .Values.fullnamePrefix -}}
{{- $suf := default "" .Values.fullnameSuffix -}}
{{- $gsuf := default "" $global.fullnameSuffix -}}
{{- $name := print $gpre $pre $base $suf $gsuf -}}
{{- $name | lower | trunc 54 | trimSuffix "-" -}}
{{- end -}}


{{- /*
chartmuseum.labels.standard prints the standard chartmuseum Helm labels.
The standard labels are frequently used in metadata.
*/ -}}
{{- define "chartmuseum.labels.standard" -}}
app: {{ template "chartmuseum.name" . }}
chart: {{ template "chartmuseum.chartref" . }}
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
{{- end -}}

{{- /*
chartmuseum.chartref prints a chart name and version.
It does minimal escaping for use in Kubernetes labels.
Example output:
chartmuseum-0.4.5
*/ -}}
{{- define "chartmuseum.chartref" -}}
{{- replace "+" "_" .Chart.Version | printf "%s-%s" .Chart.Name -}}
{{- end -}}
12 changes: 6 additions & 6 deletions incubator/chartmuseum/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ include "common.fullname" . }}
name: {{ include "chartmuseum.fullname" . }}
annotations:
{{ toYaml .Values.deployment.annotations | indent 4 }}
labels:
{{ include "common.labels.standard" . | indent 4 }}
{{ include "chartmuseum.labels.standard" . | indent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
strategy:
{{ toYaml .Values.strategy | indent 4 }}
revisionHistoryLimit: 10
template:
metadata:
name: {{ include "common.fullname" . }}
name: {{ include "chartmuseum.fullname" . }}
annotations:
{{ toYaml .Values.replica.annotations | indent 8 }}
labels:
app: {{ template "common.name" . }}
app: {{ template "chartmuseum.name" . }}
release: {{ .Release.Name | quote }}
spec:
containers:
Expand All @@ -31,7 +31,7 @@ spec:
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- $secret_name := include "common.fullname" . }}
{{- $secret_name := include "chartmuseum.fullname" . }}
{{- range $name, $value := .Values.env.secret }}
{{- if not ( empty $value) }}
- name: {{ $name | quote }}
Expand Down Expand Up @@ -86,7 +86,7 @@ spec:
- name: storage-volume
{{- if .Values.persistence.Enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.ExistingClaim | default (include "common.fullname" .) }}
claimName: {{ .Values.persistence.ExistingClaim | default (include "chartmuseum.fullname" .) }}
{{- else }}
emptyDir: {}
{{- end -}}
6 changes: 3 additions & 3 deletions incubator/chartmuseum/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{{- $servicePort := .Values.service.externalPort -}}
{{- $serviceName := include "common.fullname" . -}}
{{- $serviceName := include "chartmuseum.fullname" . -}}
{{- if .Values.ingress.enabled }}
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ include "common.fullname" . }}
name: {{ include "chartmuseum.fullname" . }}
annotations:
{{ toYaml .Values.ingress.annotations | indent 4 }}
labels:
{{- if .Values.ingress.labels }}
{{ toYaml .Values.ingress.labels | indent 4 }}
{{- end }}
{{ include "common.labels.standard" . | indent 4 }}
{{ include "chartmuseum.labels.standard" . | indent 4 }}
spec:
rules:
{{- range $host, $paths := .Values.ingress.hosts }}
Expand Down
4 changes: 2 additions & 2 deletions incubator/chartmuseum/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "common.fullname" . }}
name: {{ include "chartmuseum.fullname" . }}
labels:
app: {{ include "common.fullname" . }}
app: {{ include "chartmuseum.fullname" . }}
release: {{ .Release.Name | quote }}
spec:
accessModes:
Expand Down
4 changes: 2 additions & 2 deletions incubator/chartmuseum/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "common.fullname" . }}
name: {{ include "chartmuseum.fullname" . }}
labels:
{{ include "common.labels.standard" . | indent 4 }}
{{ include "chartmuseum.labels.standard" . | indent 4 }}
type: Opaque
data:
{{- range $name, $value := .Values.env.secret }}
Expand Down
8 changes: 4 additions & 4 deletions incubator/chartmuseum/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "common.fullname" . }}
name: {{ include "chartmuseum.fullname" . }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
labels:
{{ include "common.labels.standard" . | indent 4 }}
{{ include "chartmuseum.labels.standard" . | indent 4 }}
{{- if .Values.service.annotations }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
Expand All @@ -20,7 +20,7 @@ spec:
targetPort: {{ .Values.service.internalPort }}
{{- end }}
protocol: TCP
name: {{ .Release.Name }}
name: http
selector:
app: {{ template "common.name" . }}
app: {{ template "chartmuseum.name" . }}
release: {{ .Release.Name | quote }}

0 comments on commit 978daf5

Please sign in to comment.