Onechart docs spike
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
.idea/
|
||||
values.yaml
|
||||
manifests
|
||||
website/site
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{{ if .Values.vars }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
@@ -9,3 +10,4 @@ data:
|
||||
{{- range $key, $val := .Values.vars }}
|
||||
{{ $key }}: {{ $val | quote }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
# onechart-docs
|
||||
@@ -0,0 +1,30 @@
|
||||
OneChart settings for deploying a cron job:
|
||||
|
||||
```yaml
|
||||
image:
|
||||
repository: debian
|
||||
tag: stable-slim
|
||||
|
||||
schedule: "0 1 0 0 0"
|
||||
command: |
|
||||
echo "hello"
|
||||
```
|
||||
|
||||
Check the Kubernetes manifest:
|
||||
|
||||
```bash
|
||||
cat << EOF > values.yaml
|
||||
image:
|
||||
repository: debian
|
||||
tag: stable-slim
|
||||
|
||||
schedule: "0 1 0 0 0"
|
||||
command: |
|
||||
echo "hello"
|
||||
EOF
|
||||
|
||||
helm template my-release onechart/cron-job -f values.yaml
|
||||
```
|
||||
|
||||
!!! warning
|
||||
Make sure to use the `onechart/cron-job` chart.
|
||||
@@ -0,0 +1,25 @@
|
||||
OneChart settings for overriding the default command to run:
|
||||
|
||||
```yaml
|
||||
image:
|
||||
repository: debian
|
||||
tag: stable-slim
|
||||
|
||||
command: |
|
||||
while true; date; sleep 2; done
|
||||
```
|
||||
|
||||
Check the Kubernetes manifest:
|
||||
|
||||
```bash
|
||||
cat << EOF > values.yaml
|
||||
image:
|
||||
repository: debian
|
||||
tag: stable-slim
|
||||
|
||||
command: |
|
||||
echo "hello"
|
||||
EOF
|
||||
|
||||
helm template my-release onechart/onechart -f values.yaml
|
||||
```
|
||||
@@ -0,0 +1,30 @@
|
||||
OneChart settings for deploying `my-web-app` image from Amazon ECR:
|
||||
|
||||
```yaml
|
||||
image:
|
||||
repository: aws_account_id.dkr.ecr.region.amazonaws.com/my-web-app
|
||||
tag: x.y.z
|
||||
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
||||
```
|
||||
|
||||
Check the Kubernetes manifest:
|
||||
|
||||
```bash
|
||||
cat << EOF > values.yaml
|
||||
image:
|
||||
repository: aws_account_id.dkr.ecr.region.amazonaws.com/my-web-app
|
||||
tag: x.y.z
|
||||
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
||||
EOF
|
||||
|
||||
helm template my-release onechart/onechart -f values.yaml
|
||||
```
|
||||
|
||||
!!! warning
|
||||
The `regcred` image pull credentials must be set up in the cluster.
|
||||
|
||||
See how: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
@@ -0,0 +1,19 @@
|
||||
OneChart settings for deploying the Nginx image:
|
||||
|
||||
```yaml
|
||||
image:
|
||||
repository: nginx
|
||||
tag: 1.19.3
|
||||
```
|
||||
|
||||
Check the Kubernetes manifest:
|
||||
|
||||
```bash
|
||||
cat << EOF > values.yaml
|
||||
image:
|
||||
repository: nginx
|
||||
tag: 1.19.3
|
||||
EOF
|
||||
|
||||
helm template my-release onechart/onechart -f values.yaml
|
||||
```
|
||||
@@ -0,0 +1,32 @@
|
||||
OneChart generates an `Ingress` resource for the Nginx ingress controller with the following settings:
|
||||
|
||||
```yaml
|
||||
image:
|
||||
repository: nginx
|
||||
tag: 1.19.3
|
||||
|
||||
ingress:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
host: chart-example.local
|
||||
```
|
||||
|
||||
Check the Kubernetes manifest:
|
||||
|
||||
```bash
|
||||
cat << EOF > values.yaml
|
||||
image:
|
||||
repository: nginx
|
||||
tag: 1.19.3
|
||||
|
||||
ingress:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
host: chart-example.local
|
||||
EOF
|
||||
|
||||
helm template my-release onechart/onechart -f values.yaml
|
||||
```
|
||||
|
||||
!!! warning
|
||||
The Nginx ingress controller must be set up in your cluster for this setting to work.
|
||||
@@ -0,0 +1,31 @@
|
||||
OneChart settings for setting environment variables:
|
||||
|
||||
```yaml
|
||||
image:
|
||||
repository: nginx
|
||||
tag: 1.19.3
|
||||
|
||||
vars:
|
||||
VAR_1: "value 1"
|
||||
VAR_2: "value 2"
|
||||
```
|
||||
|
||||
Check the Kubernetes manifest:
|
||||
|
||||
```bash
|
||||
cat << EOF > values.yaml
|
||||
image:
|
||||
repository: nginx
|
||||
tag: 1.19.3
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
helm template my-release onechart/onechart -f values.yaml
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
OneChart creates a `ConfigMap` with all the defined environment variables.
|
||||
|
||||
Then includes all entries with the `EnvFrom` field in the deployment.
|
||||
@@ -0,0 +1,31 @@
|
||||
OneChart can reference an existing secret:
|
||||
|
||||
```yaml
|
||||
image:
|
||||
repository: nginx
|
||||
tag: 1.19.3
|
||||
|
||||
secret:
|
||||
enabled: true
|
||||
```
|
||||
|
||||
Check the Kubernetes manifest:
|
||||
|
||||
```bash
|
||||
cat << EOF > values.yaml
|
||||
image:
|
||||
repository: nginx
|
||||
tag: 1.19.3
|
||||
|
||||
secret:
|
||||
enabled: true
|
||||
EOF
|
||||
|
||||
helm template my-release onechart/onechart -f values.yaml
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
OneChart references an existing Kubernetes `Secret` and includes all entries in the deployment with the `EnvFrom` field.
|
||||
|
||||
The secret name must match the release name. `my-release` in the above example.
|
||||
@@ -0,0 +1,46 @@
|
||||
OneChart settings for setting environment variables:
|
||||
|
||||
```yaml
|
||||
image:
|
||||
repository: nginx
|
||||
tag: 1.19.3
|
||||
|
||||
volumes:
|
||||
- name: data
|
||||
path: /var/lib/1clickinfra/data
|
||||
size: 10Gi
|
||||
storageClass: default
|
||||
```
|
||||
|
||||
Check the Kubernetes manifest:
|
||||
|
||||
```bash
|
||||
cat << EOF > values.yaml
|
||||
image:
|
||||
repository: nginx
|
||||
tag: 1.19.3
|
||||
|
||||
volumes:
|
||||
- name: data
|
||||
path: /var/lib/1clickinfra/data
|
||||
size: 10Gi
|
||||
storageClass: default
|
||||
EOF
|
||||
|
||||
helm template my-release onechart/onechart -f values.yaml
|
||||
```
|
||||
|
||||
!!! warning
|
||||
|
||||
OneChart generates a `PeristentVolumeClaim` with this configuration and mounts it to the given path.
|
||||
|
||||
You have to know what `storageClass` is supported in your cluster.
|
||||
|
||||
- On Google Cloud, `standard` gets you disk
|
||||
- On Azure, `default` gets you a normal block storage
|
||||
- Amazon EKS, `TODO`
|
||||
- Use `do-block-storage` for Digital Ocean
|
||||
|
||||
### Mount an Azure file storage
|
||||
|
||||
TODO
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
Add the OneChart Helm repository:
|
||||
|
||||
```bash
|
||||
helm repo add onechart https://chart.onechart.dev
|
||||
```
|
||||
|
||||
Check the generated Kubernetes yaml:
|
||||
|
||||
```bash
|
||||
helm template my-release onechart/onechart \
|
||||
--set image.repository=nginx \
|
||||
--set image.tag=1.19.3
|
||||
```
|
||||
|
||||
Deploy with Helm:
|
||||
|
||||
```bash
|
||||
helm install my-release onechart/onechart \
|
||||
--set image.repository=nginx \
|
||||
--set image.tag=1.19.3
|
||||
```
|
||||
|
||||
See all [Examples](/examples/deploying-an-image)
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
template: home.html
|
||||
title: Material for MkDocs
|
||||
---
|
||||
@@ -0,0 +1,138 @@
|
||||
# Copyright (c) 2016-2020 Martin Donath <martin.donath@squidfunk.com>
|
||||
# Copyright (c) 2020 Laszlo Fogas <laszlo@laszlo.cloud>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# Project information
|
||||
site_name: OneChart
|
||||
site_url: https://onechart.dev
|
||||
site_author: Laszlo Fogas
|
||||
site_description: >-
|
||||
One Helm chart to rule them all. One Helm chart for your apps.
|
||||
Because no-one can remember the Kubernetes yaml syntax.
|
||||
# Repository
|
||||
repo_name: onechart/onechart
|
||||
repo_url: https://github.com/onechart/onechart
|
||||
edit_uri: https://github.com/onechart/onechart/website
|
||||
|
||||
# Copyright
|
||||
copyright: Copyright © 2020 Laszlo Fogas
|
||||
|
||||
# Configuration
|
||||
theme:
|
||||
name: material
|
||||
custom_dir: overrides
|
||||
|
||||
# 404 page
|
||||
static_templates:
|
||||
- 404.html
|
||||
|
||||
# Don't include MkDocs' JavaScript
|
||||
include_search_page: false
|
||||
search_index_only: true
|
||||
|
||||
# Default values, taken from mkdocs_theme.yml
|
||||
language: en
|
||||
features:
|
||||
- navigation.tabs
|
||||
- navigation.instant
|
||||
palette:
|
||||
scheme: default
|
||||
primary: indigo
|
||||
accent: indigo
|
||||
font:
|
||||
text: Roboto
|
||||
code: Roboto Mono
|
||||
favicon: assets/favicon.png
|
||||
icon:
|
||||
logo: logo
|
||||
|
||||
# Plugins
|
||||
plugins:
|
||||
- search
|
||||
- minify:
|
||||
minify_html: true
|
||||
|
||||
# Customization
|
||||
extra:
|
||||
social:
|
||||
- icon: fontawesome/brands/github
|
||||
link: https://github.com/laszlocph
|
||||
- icon: fontawesome/brands/gitter
|
||||
link: https://gitter.im/squidfunk/mkdocs-material
|
||||
- icon: fontawesome/brands/twitter
|
||||
link: https://twitter.com/laszlocph
|
||||
- icon: fontawesome/brands/linkedin
|
||||
link: https://linkedin.com/in/laszlofogas
|
||||
|
||||
# Extensions
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- abbr
|
||||
- attr_list
|
||||
- def_list
|
||||
- footnotes
|
||||
- meta
|
||||
- toc:
|
||||
permalink: true
|
||||
- pymdownx.arithmatex:
|
||||
generic: true
|
||||
- pymdownx.betterem:
|
||||
smart_enable: all
|
||||
- pymdownx.caret
|
||||
- pymdownx.critic
|
||||
- pymdownx.details
|
||||
- pymdownx.emoji:
|
||||
emoji_index: !!python/name:materialx.emoji.twemoji
|
||||
emoji_generator: !!python/name:materialx.emoji.to_svg
|
||||
- pymdownx.highlight
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.keys
|
||||
- pymdownx.magiclink:
|
||||
repo_url_shorthand: true
|
||||
user: squidfunk
|
||||
repo: mkdocs-material
|
||||
- pymdownx.mark
|
||||
- pymdownx.smartsymbols
|
||||
- pymdownx.snippets:
|
||||
check_paths: true
|
||||
- pymdownx.superfences:
|
||||
custom_fences:
|
||||
- name: mermaid
|
||||
class: mermaid
|
||||
format: !!python/name:pymdownx.superfences.fence_code_format
|
||||
- pymdownx.tabbed
|
||||
- pymdownx.tasklist:
|
||||
custom_checkbox: true
|
||||
- pymdownx.tilde
|
||||
|
||||
# Page tree
|
||||
nav:
|
||||
- Home: index.md
|
||||
- Getting started:
|
||||
- Getting started: getting-started.md
|
||||
- Examples:
|
||||
- Deploying an image: examples/deploying-an-image.md
|
||||
- Deploying a private image: examples/deploying-a-private-image.md
|
||||
- Environment variables: examples/environment-variables.md
|
||||
- Secrets: examples/secrets.md
|
||||
- Domain names: examples/domain-names.md
|
||||
- Volumes: examples/volumes.md
|
||||
- Custom command: examples/custom-command.md
|
||||
- Cron job: examples/cron-job.md
|
||||
@@ -0,0 +1,21 @@
|
||||
{% extends "main.html" %}
|
||||
{% block extrahead %}
|
||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
|
||||
{% endblock %}
|
||||
|
||||
{% block tabs %}
|
||||
{{ super() }}
|
||||
<section class="container mx-auto">
|
||||
<div class="md-grid md-typeset">
|
||||
<div class="tx-hero">
|
||||
<div class="tx-hero__content">
|
||||
<h1>Technical documentation that just works</h1>
|
||||
<p>{{ config.site_description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
{% block site_nav %}{% endblock %}
|
||||
{% block content %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
@@ -0,0 +1,2 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
Reference in New Issue
Block a user