UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit 4ec684a4 authored by Thomas Runyon's avatar Thomas Runyon
Browse files

Documentation chart

parent 1e28debd
Branches master
No related merge requests found
# 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
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
apiVersion: v2
name: documentation
description: Big Bang Documentation
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0-bb.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 1.16.0
apiVersion: apps/v1
kind: Deployment
metadata:
name: docs
spec:
replicas: 1
selector:
matchLabels:
name: docs
template:
metadata:
labels:
name: docs
spec:
containers:
{{- range .Values.packages }}
- name: {{ .name }}
image: {{ $.Values.gitSync.image.repository }}:{{ $.Values.gitSync.image.tag }}
volumeMounts:
- name: {{ .name }}
mountPath: /tmp/git
env:
- name: GIT_SYNC_REPO
value: {{ .repo }}
- name: GIT_SYNC_DEST
value: {{ .name }}
- name: GIT_SYNC_BRANCH
value: {{ .branch }}
- name: GIT_SYNC_USERNAME
value: {{ $.Values.global.git.username }}
- name: GIT_SYNC_PASSWORD
value: {{ $.Values.global.git.password }}
{{- end }}
- name: git-sync
image: {{ $.Values.gitSync.image.repository }}:{{ $.Values.gitSync.image.tag }}
volumeMounts:
- name: docs
mountPath: /tmp/git
env:
- name: GIT_SYNC_REPO
value: {{ .Values.docs.repo }}
- name: GIT_SYNC_DEST
value: docs
- name: GIT_SYNC_BRANCH
value: {{ .Values.docs.branch }}
- name: GIT_SYNC_USERNAME
value: {{ $.Values.global.git.username }}
- name: GIT_SYNC_PASSWORD
value: {{ $.Values.global.git.password }}
- name: hugo
image: {{ .Values.hugo.image.repository }}:{{ .Values.hugo.image.tag }}
volumeMounts:
- name: markdown
mountPath: /src
- name: html
mountPath: /dest
- name: docs
mountPath: /packages/docs
{{- range .Values.packages }}
- name: {{ .name }}
mountPath: /packages/{{ .name }}
{{- end}}
command: ["/bin/sh", "-c"]
args:
- echo "hello";
mkdir /src/docs;
cp -R /packages/docs/docs/{{ .Values.docs.path }}/* /src/docs;
{{- range .Values.packages }}
cp -R /packages/{{ .name }}/{{ .name }}/{{ .path}} /src/docs/content/{{ .name }};
{{- end }}
ls -lah /src/docs;
hugo server --source=/src/docs/ --appendPort=false --disableBrowserError --disableFastRender --bind=0.0.0.0 --baseURL=https://docs.{{ .Values.hostname }} --destination=/dest
env:
- name: HUGO_BUILD_DRAFT
value: "true"
- name: HUGO_BASE_URL
value: docs.{{ .Values.hostname }}
- name: HUGO_PARAMS_HOSTNAME
value: {{ .Values.hostname }}
- name: nginx
image: nginx
volumeMounts:
- name: html
mountPath: /usr/share/nginx/html
- name: tmp
mountPath: /tmp
volumes:
{{- range .Values.packages }}
- name: {{ .name }}
emptyDir: {}
{{- end}}
- name: markdown
emptyDir: {}
- name: html
emptyDir: {}
- name: docs
emptyDir: {}
- name: tmp
emptyDir: {}
apiVersion: v1
kind: Service
metadata:
name: docs
namespace: {{ .Release.Namespace }}
spec:
ports:
- port: 80
selector:
name: docs
\ No newline at end of file
{{- if .Values.istio.enabled }}
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: docs
namespace: {{ .Release.Namespace }}
spec:
gateways:
- main.istio-system.svc.cluster.local
hosts:
- "docs.{{ .Values.hostname }}"
http:
- route:
- destination:
port:
number: 80
host: docs
{{- end }}
\ No newline at end of file
# Default values for chart.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
hostname: bigbang.dev
global:
git:
username: ""
password: ""
istio:
enabled: true
docs:
repo: https://repo1.dsop.io/platform-one/big-bang/apps/sandbox/documentation.git
branch: master
# path to hugo site
path: hugo
# todo add imagepullsecrets
gitSync:
image:
repository: k8s.gcr.io/git-sync
tag: v3.1.3
hugo:
image:
repository: klakegg/hugo
tag: 0.78.1-busybox
packages:
- name: argocd
repo: https://repo1.dsop.io/platform-one/big-bang/apps/core/argocd.git
branch: docs
path: docs
- name: cluster-auditor
repo: https://repo1.dsop.io/platform-one/big-bang/apps/core/cluster-auditor.git
branch: docs
path: docs
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment