Skip to content

Commit

Permalink
add toolbox chart
Browse files Browse the repository at this point in the history
Signed-off-by: Tiago Bueno <[email protected]>
  • Loading branch information
tlbueno committed May 18, 2024
1 parent 5ba1e17 commit a18c114
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/toolbox/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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/
24 changes: 24 additions & 0 deletions charts/toolbox/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: toolbox
description: A Helm chart to deploy a pod with a toolbox image

# 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

# 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.
# It is recommended to use it with quotes.
appVersion: "latest"
37 changes: 37 additions & 0 deletions charts/toolbox/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# toolbox

An helm chart to create a toolbox pod

The chart will:
- create a namespace
- deploy a pod with the specified image

### How to use

Check [README.md](../../README.md) for repo installation details

To install the chart, ie:
```sh
helm install my-toolbox-chart tlbueno-repo/toolbox
```

You may override the default values below by creating a yaml file with one or more entries and use it in helm command, ie:
```sh
helm install my-toolbox-chart -f ./my-values.yaml tlbueno-repo/toolbox
```

Default values:
```yaml
# Default values for toolbox.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

namespace:
# namespace name
name: toolbox

container:
# image to be used in the pod
image: quay.io/tlbueno/toolbox:latest
```
5 changes: 5 additions & 0 deletions charts/toolbox/templates/Namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.namespace.name }}

10 changes: 10 additions & 0 deletions charts/toolbox/templates/Pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Pod
metadata:
name: toolbox
namespace: {{ .Values.namespace.name }}
spec:
containers:
- name: toolbox-container
image: {{ .Values.container.image }}
command: ["/bin/bash", "-c", "while true; do sleep 3600; done"]
12 changes: 12 additions & 0 deletions charts/toolbox/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Default values for toolbox.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

namespace:
# namespace name
name: tools

container:
# image to be used in the pod
image: quay.io/tlbueno/toolbox:latest

0 comments on commit a18c114

Please sign in to comment.