-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Helm chart for installing Kubeapps #349
Changes from all commits
08cd563
a84af5a
a7c143f
4712447
4ae5cd8
1378a22
4b073f5
8a293da
c0530e9
5cac791
ba30bfd
a10eb2b
a808efd
469f00a
bd583b7
781ae64
8b00899
a215485
4784987
5bffdf6
3f7a80f
d720a31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
charts/*.tgz |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
name: kubeapps | ||
version: 0.1.0 | ||
appVersion: 1.0.0.alpha.4 | ||
description: Kubeapps is a dashboard for your Kubernetes cluster that makes it easy to deploy and manage applications in your cluster using Helm | ||
icon: https://raw.githubusercontent.com/kubeapps/kubeapps/master/docs/img/logo.png | ||
keywords: | ||
- helm | ||
- dashboard | ||
- service catalog | ||
- deployment | ||
home: https://kubeapps.com | ||
sources: | ||
- https://github.com/kubeapps/kubeapps | ||
maintainers: | ||
- name: bitnami-bot | ||
email: containers@bitnami.com | ||
- name: prydonius | ||
email: adnan@bitnami.com |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: mongodb | ||
repository: https://kubernetes-charts.storage.googleapis.com | ||
version: 4.0.4 | ||
digest: sha256:415440e73af7d4b02a10a15f28bb2fc095cbdffdc2e1676d76e0f0eaa1632d50 | ||
generated: 2018-08-01T11:50:24.777058724-07:00 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dependencies: | ||
- name: mongodb | ||
version: ">= 0" | ||
repository: https://kubernetes-charts.storage.googleapis.com |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
1. Get the application URL by running these commands: | ||
{{- if .Values.ingress.enabled }} | ||
{{- range .Values.ingress.hosts }} | ||
echo http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }} | ||
{{- end }} | ||
{{- else if contains "NodePort" .Values.frontend.service.type }} | ||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "kubeapps.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.frontend.service.type }} | ||
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch the status by running 'kubectl get svc -w {{ template "kubeapps.fullname" . }}' | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kubeapps.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | ||
echo http://$SERVICE_IP:{{ .Values.frontend.service.port }} | ||
{{- else if contains "ClusterIP" .Values.frontend.service.type }} | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "kubeapps.fullname" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") | ||
echo "Visit http://127.0.0.1:8080 to use your application" | ||
kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME 8080:8080 | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "kubeapps.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | 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). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "kubeapps.fullname" -}} | ||
{{- if .Values.fullnameOverride -}} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- if contains $name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Render image reference | ||
*/}} | ||
{{- define "kubeapps.image" -}} | ||
{{ .registry }}/{{ .repository }}:{{ .tag }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a default fully qualified app name for MongoDB dependency. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
*/}} | ||
{{- define "kubeapps.mongodb.fullname" -}} | ||
{{- $name := default "mongodb" .Values.mongodb.nameOverride -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "kubeapps.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create name for the apprepository-controller based on the fullname | ||
*/}} | ||
{{- define "kubeapps.apprepository.fullname" -}} | ||
{{ template "kubeapps.fullname" . }}-apprepository-controller | ||
{{- end -}} | ||
|
||
{{/* | ||
Create name for the apprepository bootstrap job | ||
*/}} | ||
{{- define "kubeapps.apprepository-jobs-bootstrap.fullname" -}} | ||
{{ template "kubeapps.fullname" . }}-apprepository-jobs-bootstrap | ||
{{- end -}} | ||
|
||
{{/* | ||
Create name for the chartsvc based on the fullname | ||
*/}} | ||
{{- define "kubeapps.chartsvc.fullname" -}} | ||
{{ template "kubeapps.fullname" . }}-chartsvc | ||
{{- end -}} | ||
|
||
{{/* | ||
Create name for the dashboard based on the fullname | ||
*/}} | ||
{{- define "kubeapps.dashboard.fullname" -}} | ||
{{ template "kubeapps.fullname" . }}-dashboard | ||
{{- end -}} | ||
|
||
{{/* | ||
Create name for the dashboard config based on the fullname | ||
*/}} | ||
{{- define "kubeapps.dashboard-config.fullname" -}} | ||
{{ template "kubeapps.fullname" . }}-dashboard-config | ||
{{- end -}} | ||
|
||
{{/* | ||
Create name for the frontend config based on the fullname | ||
*/}} | ||
{{- define "kubeapps.frontend-config.fullname" -}} | ||
{{ template "kubeapps.fullname" . }}-frontend-config | ||
{{- end -}} | ||
|
||
{{/* | ||
Create name for the tiller-proxy based on the fullname | ||
*/}} | ||
{{- define "kubeapps.tiller-proxy.fullname" -}} | ||
{{ template "kubeapps.fullname" . }}-tiller-proxy | ||
{{- end -}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: apprepositories.kubeapps.com | ||
labels: | ||
app: {{ template "kubeapps.apprepository.fullname" . }} | ||
chart: {{ template "kubeapps.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
group: kubeapps.com | ||
names: | ||
kind: AppRepository | ||
plural: apprepositories | ||
shortNames: | ||
- apprepos | ||
version: v1alpha1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
apiVersion: apps/v1beta2 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "kubeapps.apprepository.fullname" . }} | ||
labels: | ||
app: {{ template "kubeapps.apprepository.fullname" . }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see that when there is an issue deploying a chart from kubeapps the following message is show:
However, it seems any pod created by the chart has the label There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where are you seeing that? I thought that was from the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh sorry, it's actually shown in the UI, will fix that thanks. Note you'll need to build images for the apprepository-controller and dashboard to make this actually work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, I saw that Ara already built the images so I used the same ones |
||
chart: {{ template "kubeapps.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: {{ template "kubeapps.apprepository.fullname" . }} | ||
release: {{ .Release.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ template "kubeapps.apprepository.fullname" . }} | ||
release: {{ .Release.Name }} | ||
spec: | ||
serviceAccountName: {{ template "kubeapps.apprepository.fullname" . }} | ||
containers: | ||
- name: controller | ||
image: {{ template "kubeapps.image" .Values.apprepository.image }} | ||
command: | ||
- /apprepository-controller | ||
args: | ||
- --logtostderr | ||
- --repo-sync-image={{ template "kubeapps.image" .Values.apprepository.syncImage }} | ||
- --namespace={{ .Release.Namespace }} | ||
- --mongo-url={{ template "kubeapps.mongodb.fullname" . }} | ||
- --mongo-secret-name={{ template "kubeapps.mongodb.fullname" . }} | ||
resources: | ||
{{ toYaml .Values.apprepository.resources | indent 12 }} | ||
{{- with .Values.apprepository.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
{{- with .Values.apprepository.affinity }} | ||
affinity: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
{{- with .Values.apprepository.tolerations }} | ||
tolerations: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
annotations: | ||
helm.sh/hook: post-install | ||
helm.sh/hook-delete-policy: hook-succeeded | ||
helm.sh/hook-weight: "-10" | ||
labels: | ||
app: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
chart: {{ template "kubeapps.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
data: | ||
apprepositories.yaml: |- | ||
{{- range .Values.apprepository.initialRepos }} | ||
apiVersion: kubeapps.com/v1alpha1 | ||
kind: AppRepository | ||
metadata: | ||
name: {{ .name }} | ||
labels: | ||
app: {{ template "kubeapps.apprepository.fullname" $ }} | ||
chart: {{ template "kubeapps.chart" $ }} | ||
release: {{ $.Release.Name }} | ||
heritage: {{ $.Release.Service }} | ||
spec: | ||
type: helm | ||
url: {{ .url }} | ||
--- | ||
{{ end -}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: Role | ||
metadata: | ||
name: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
annotations: | ||
helm.sh/hook: post-install | ||
helm.sh/hook-delete-policy: hook-succeeded | ||
helm.sh/hook-weight: "-10" | ||
labels: | ||
app: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
chart: {{ template "kubeapps.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
rules: | ||
- apiGroups: | ||
- kubeapps.com | ||
resources: | ||
- apprepositories | ||
verbs: | ||
- get | ||
- create | ||
- delete | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: RoleBinding | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add hook annotations. |
||
metadata: | ||
name: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
annotations: | ||
helm.sh/hook: post-install | ||
helm.sh/hook-delete-policy: hook-succeeded | ||
helm.sh/hook-weight: "-10" | ||
labels: | ||
app: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
chart: {{ template "kubeapps.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
namespace: {{ .Release.Namespace }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
annotations: | ||
helm.sh/hook: post-install | ||
helm.sh/hook-delete-policy: hook-succeeded | ||
helm.sh/hook-weight: "-10" | ||
labels: | ||
app: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
chart: {{ template "kubeapps.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
annotations: | ||
helm.sh/hook: post-install | ||
helm.sh/hook-delete-policy: hook-succeeded | ||
labels: | ||
app: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
chart: {{ template "kubeapps.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
release: {{ .Release.Name }} | ||
spec: | ||
containers: | ||
- name: kubectl | ||
image: {{ template "kubeapps.image" .Values.apprepository.jobsImage }} | ||
command: | ||
- kubectl | ||
- apply | ||
- -f | ||
- /tmp/apprepositories/apprepositories.yaml | ||
volumeMounts: | ||
- mountPath: /tmp/apprepositories | ||
name: apprepositories-config | ||
resources: | ||
{{ toYaml .Values.apprepository.resources | indent 12 }} | ||
volumes: | ||
- name: apprepositories-config | ||
configMap: | ||
name: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
restartPolicy: OnFailure | ||
serviceAccountName: {{ template "kubeapps.apprepository-jobs-bootstrap.fullname" . }} | ||
{{- with .Values.apprepository.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
{{- with .Values.apprepository.affinity }} | ||
affinity: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
{{- with .Values.apprepository.tolerations }} | ||
tolerations: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you also add the
maintainers
and other metadata likehome
,sources
andicon
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I'll do that, thanks!