This repository has been archived by the owner on May 6, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c3217f4
Showing
21 changed files
with
340 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
||
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 NONINFRINGEMENT. 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
for dir in $(ls -1); do | ||
if [[ -e $dir/cnab/bundle.json ]]; then | ||
cp $dir/cnab/bundle.json bundles/$dir.json | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "helloworld", | ||
"version": "0.1.0", | ||
"parameters": {}, | ||
"invocationImage": { | ||
"imageType": "azure-image", | ||
"image": "duffle-dev/duffle-vm-example-0.1.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "hellohelm", | ||
"version": "0.1.0", | ||
"invocationImage": { | ||
"imageType": "docker", | ||
"image": "technosophos/demo2:0.1.0" | ||
}, | ||
"images": [ | ||
{ | ||
"name": "alpine", | ||
"uri": "technosophos/demo2alpine:0.1.0", | ||
"refs": [ | ||
{ | ||
"path": "cnab/app/charts/alpine/values.yaml", | ||
"field": "image.repository" | ||
} | ||
] | ||
} | ||
], | ||
"parameters": { | ||
"port": { | ||
"defaultValue": 8080, | ||
"type": "int" | ||
} | ||
}, | ||
"credentials": { | ||
"kubeconfig": { | ||
"path": "/root/.kube/config" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "foo", | ||
"version": "1.0", | ||
"invocationImage": { | ||
"imageType": "docker", | ||
"image": "technosophos/helloworld:0.1.0" | ||
}, | ||
"images": [ | ||
{ | ||
"name": "image1", | ||
"uri": "urn:image1uri", | ||
"refs": [ | ||
{ | ||
"path": "image1path", | ||
"field": "image.1.field" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "image2", | ||
"uri": "urn:image2uri", | ||
"refs": [ | ||
{ | ||
"path": "image2path", | ||
"field": "image.2.field" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
#set -eo pipefail | ||
|
||
action=$CNAB_ACTION | ||
name=$CNAB_INSTALLATION_NAME | ||
|
||
case $action in | ||
install) | ||
echo "Install action" | ||
;; | ||
uninstall) | ||
echo "uninstall action" | ||
;; | ||
upgrade) | ||
echo "Upgrade action" | ||
;; | ||
downgrade) | ||
echo "Downgrade action" | ||
;; | ||
status) | ||
echo "Status action" | ||
;; | ||
*) | ||
echo "No action for $action" | ||
;; | ||
esac | ||
echo "Action $action complete for $name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "helloworld", | ||
"version": "0.1.0", | ||
"parameters": {}, | ||
"invocationImage": { | ||
"imageType": "azure-image", | ||
"image": "duffle-dev/duffle-vm-example-0.1.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM lachlanevenson/k8s-helm:v2.10.0 | ||
|
||
COPY app/run /cnab/app/run | ||
COPY bundle.json /cnab/bundle.json | ||
COPY Dockerfile cnab/Dockerfile | ||
COPY app/charts /cnab/app/charts | ||
|
||
CMD [ "/cnab/app/run" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: alpine | ||
description: Deploy a basic Alpine Linux pod | ||
version: 0.1.0 | ||
home: https://github.com/kubernetes/helm | ||
sources: | ||
- https://github.com/kubernetes/helm | ||
appVersion: 3.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM alpine:3.7 | ||
|
||
CMD ["sleep", "9000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Alpine: A simple Helm chart | ||
|
||
Run a single pod of Alpine Linux. | ||
|
||
The `templates/` directory contains a very simple pod resource with a | ||
couple of parameters. | ||
|
||
The `values.yaml` file contains the default values for the | ||
`alpine-pod.yaml` template. | ||
|
||
You can install this example using `helm install docs/examples/alpine`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "alpine.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). | ||
*/}} | ||
{{- define "alpine.fullname" -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} |
23 changes: 23 additions & 0 deletions
23
hellohelm/cnab/app/charts/alpine/templates/alpine-pod.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: {{ template "alpine.fullname" . }} | ||
labels: | ||
# The "heritage" label is used to track which tool deployed a given chart. | ||
# It is useful for admins who want to see what releases a particular tool | ||
# is responsible for. | ||
heritage: {{ .Release.Service }} | ||
# The "release" convention makes it easy to tie a release to all of the | ||
# Kubernetes resources that were created as part of that release. | ||
release: {{ .Release.Name }} | ||
# This makes it easy to audit chart usage. | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version }} | ||
app: {{ template "alpine.name" . }} | ||
spec: | ||
# This shows how to use a simple value. This will look for a passed-in value called restartPolicy. | ||
restartPolicy: {{ .Values.restartPolicy }} | ||
containers: | ||
- name: waiter | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
command: ["/bin/sleep", "9000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
image: | ||
repository: alpine | ||
tag: 3.3 | ||
pullPolicy: IfNotPresent | ||
|
||
restartPolicy: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "hellohelm", | ||
"version": "0.1.0", | ||
"invocationImage": { | ||
"imageType": "docker", | ||
"image": "technosophos/demo2:0.1.0" | ||
}, | ||
"images": [ | ||
{ | ||
"name": "alpine", | ||
"uri": "technosophos/demo2alpine:0.1.0", | ||
"refs": [ | ||
{ | ||
"path": "cnab/app/charts/alpine/values.yaml", | ||
"field": "image.repository" | ||
} | ||
] | ||
} | ||
], | ||
"parameters": { | ||
"port": { | ||
"defaultValue": 8080, | ||
"type": "int" | ||
} | ||
}, | ||
"credentials": { | ||
"kubeconfig": { | ||
"path": "/root/.kube/config" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/sh | ||
export KUBECONFIG="/root/.kube/config" | ||
action=$CNAB_ACTION | ||
name=$CNAB_INSTALLATION_NAME | ||
mychart=/cnab/app/charts/alpine | ||
|
||
case $action in | ||
install) | ||
echo "Installing local chart" | ||
helm install -n $name $mychart | ||
;; | ||
uninstall) | ||
echo "uninstall action" | ||
helm delete --purge $name | ||
;; | ||
upgrade) | ||
echo "Upgrade action" | ||
helm upgrade $name $mychart | ||
;; | ||
downgrade) | ||
status) | ||
echo "Status action" | ||
helm status $name | ||
;; | ||
*) | ||
echo "No action for $action" | ||
;; | ||
esac | ||
echo "Action $action complete for $name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name = "hellohelm" | ||
registry = "technosophos" | ||
components = ["cnab"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM alpine:latest | ||
|
||
COPY app/run /cnab/app/run | ||
COPY bundle.json /cnab/bundle.json | ||
COPY Dockerfile cnab/Dockerfile | ||
|
||
CMD [ "/cnab/app/run" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
#set -eo pipefail | ||
|
||
action=$CNAB_ACTION | ||
name=$CNAB_INSTALLATION_NAME | ||
|
||
case $action in | ||
install) | ||
echo "Install action" | ||
;; | ||
uninstall) | ||
echo "uninstall action" | ||
;; | ||
upgrade) | ||
echo "Upgrade action" | ||
;; | ||
downgrade) | ||
echo "Downgrade action" | ||
;; | ||
status) | ||
echo "Status action" | ||
;; | ||
*) | ||
echo "No action for $action" | ||
;; | ||
esac | ||
echo "Action $action complete for $name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "foo", | ||
"version": "1.0", | ||
"invocationImage": { | ||
"imageType": "docker", | ||
"image": "technosophos/helloworld:0.1.0" | ||
}, | ||
"images": [ | ||
{ | ||
"name": "image1", | ||
"uri": "urn:image1uri", | ||
"refs": [ | ||
{ | ||
"path": "image1path", | ||
"field": "image.1.field" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "image2", | ||
"uri": "urn:image2uri", | ||
"refs": [ | ||
{ | ||
"path": "image2path", | ||
"field": "image.2.field" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name = "helloworld" | ||
registry = "bacongobbler" | ||
components = ["cnab"] |