restructure
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# Helm Diff Deployment
|
||||
|
||||
<!-- action-docs-description source="action.yml" -->
|
||||
## Description
|
||||
|
||||
Diff a Helm chart for a deployment in a Kubernetes cluster
|
||||
<!-- action-docs-description source="action.yml" -->
|
||||
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
## Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| --- | --- | --- | --- |
|
||||
| `DEPLOYMENT_NAME` | <p>The Kubernetes Deployment to update</p> | `true` | `""` |
|
||||
| `DEPLOYMENT_NAMESPACE` | <p>The Kubernetes namespace of the Deployment</p> | `true` | `""` |
|
||||
| `IMAGE_PATH` | <p>The registry path to the image</p> | `true` | `""` |
|
||||
| `IMAGE_TAG` | <p>The image tag to deploy</p> | `true` | `""` |
|
||||
| `CONTAINER_NAME` | <p>The container component to update</p> | `true` | `""` |
|
||||
| `VALUES_FILE` | <p>The values file to use</p> | `false` | `./helm/values.yaml` |
|
||||
| `CHART_PATH` | <p>Path to the Helm chart</p> | `false` | `./helm` |
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
|
||||
<!-- action-docs-runs source="action.yml" -->
|
||||
## Runs
|
||||
|
||||
This action is a `composite` action.
|
||||
<!-- action-docs-runs source="action.yml" -->
|
||||
@@ -0,0 +1,38 @@
|
||||
name: Helm Diff Deployment
|
||||
description: Diff a Helm chart for a deployment in a Kubernetes cluster
|
||||
inputs:
|
||||
DEPLOYMENT_NAME:
|
||||
description: "The Kubernetes Deployment to update"
|
||||
required: true
|
||||
DEPLOYMENT_NAMESPACE:
|
||||
description: "The Kubernetes namespace of the Deployment"
|
||||
required: true
|
||||
IMAGE_PATH:
|
||||
description: "The registry path to the image"
|
||||
required: true
|
||||
IMAGE_TAG:
|
||||
description: "The image tag to deploy"
|
||||
required: true
|
||||
CONTAINER_NAME:
|
||||
description: "The container component to update"
|
||||
required: true
|
||||
VALUES_FILE:
|
||||
description: "The values file to use"
|
||||
default: "./helm/values.yaml"
|
||||
CHART_PATH:
|
||||
description: "Path to the Helm chart"
|
||||
default: "./helm"
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Install Helm Diff
|
||||
shell: sh
|
||||
run: |
|
||||
helm plugin list | grep -q diff || helm plugin install https://github.com/databus23/helm-diff
|
||||
- name: Helm Diff
|
||||
shell: sh
|
||||
run: |
|
||||
CMD="helm diff upgrade ${{ inputs.DEPLOYMENT_NAME }} ${{ inputs.CHART_PATH }} -n ${{ inputs.DEPLOYMENT_NAMESPACE }} --values ${{ inputs.VALUES_FILE }} --set deploy.${{ inputs.CONTAINER_NAME }}.tag=${{ inputs.IMAGE_TAG }} --set image.repository=${{ inputs.IMAGE_PATH }} --context 5"
|
||||
echo "Running: $CMD"
|
||||
eval "$CMD"
|
||||
@@ -0,0 +1,27 @@
|
||||
# Helm Upgrade Deployment Image
|
||||
|
||||
<!-- action-docs-description source="action.yml" -->
|
||||
## Description
|
||||
|
||||
Set the image for a deployment in a Kubernetes
|
||||
<!-- action-docs-description source="action.yml" -->
|
||||
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
## Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| --- | --- | --- | --- |
|
||||
| `DEPLOYMENT_NAME` | <p>The Kubernetes Deployment to update</p> | `true` | `""` |
|
||||
| `DEPLOYMENT_NAMESPACE` | <p>The Kubernetes namespace of the Deployment</p> | `true` | `""` |
|
||||
| `IMAGE_PATH` | <p>The registry path to the image</p> | `true` | `""` |
|
||||
| `IMAGE_TAG` | <p>The image tag to deploy</p> | `true` | `""` |
|
||||
| `CONTAINER_NAME` | <p>The container component to update</p> | `true` | `""` |
|
||||
| `VALUES_FILE` | <p>The values file to use</p> | `false` | `./helm/values.yaml` |
|
||||
| `CHART_PATH` | <p>Path to the Helm chart</p> | `false` | `./helm` |
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
|
||||
<!-- action-docs-runs source="action.yml" -->
|
||||
## Runs
|
||||
|
||||
This action is a `composite` action.
|
||||
<!-- action-docs-runs source="action.yml" -->
|
||||
@@ -0,0 +1,34 @@
|
||||
name: Helm Upgrade Deployment Image
|
||||
description: Set the image for a deployment in a Kubernetes
|
||||
inputs:
|
||||
DEPLOYMENT_NAME:
|
||||
description: "The Kubernetes Deployment to update"
|
||||
required: true
|
||||
DEPLOYMENT_NAMESPACE:
|
||||
description: "The Kubernetes namespace of the Deployment"
|
||||
required: true
|
||||
IMAGE_PATH:
|
||||
description: "The registry path to the image"
|
||||
required: true
|
||||
IMAGE_TAG:
|
||||
description: "The image tag to deploy"
|
||||
required: true
|
||||
CONTAINER_NAME:
|
||||
description: "The container component to update"
|
||||
required: true
|
||||
VALUES_FILE:
|
||||
description: "The values file to use"
|
||||
default: "./helm/values.yaml"
|
||||
CHART_PATH:
|
||||
description: "Path to the Helm chart"
|
||||
default: "./helm"
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Helm Set Image
|
||||
shell: sh
|
||||
run: |
|
||||
CMD="helm upgrade ${{ inputs.DEPLOYMENT_NAME }} ${{ inputs.CHART_PATH }} -n ${{ inputs.DEPLOYMENT_NAMESPACE }} --values ${{ inputs.VALUES_FILE }} --set deploy.${{ inputs.CONTAINER_NAME }}.tag=${{ inputs.IMAGE_TAG }} --set image.repository=${{ inputs.IMAGE_PATH }}"
|
||||
echo "Running: $CMD"
|
||||
eval "$CMD"
|
||||
@@ -0,0 +1,27 @@
|
||||
# Helm Template Deployment
|
||||
|
||||
<!-- action-docs-description source="action.yml" -->
|
||||
## Description
|
||||
|
||||
Template a Helm chart for a deployment in a Kubernetes cluster
|
||||
<!-- action-docs-description source="action.yml" -->
|
||||
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
## Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| --- | --- | --- | --- |
|
||||
| `DEPLOYMENT_NAME` | <p>The Kubernetes Deployment to update</p> | `true` | `""` |
|
||||
| `DEPLOYMENT_NAMESPACE` | <p>The Kubernetes namespace of the Deployment</p> | `true` | `""` |
|
||||
| `IMAGE_PATH` | <p>The registry path to the image</p> | `true` | `""` |
|
||||
| `IMAGE_TAG` | <p>The image tag to deploy</p> | `true` | `""` |
|
||||
| `CONTAINER_NAME` | <p>The container component to update</p> | `true` | `""` |
|
||||
| `VALUES_FILE` | <p>The values file to use</p> | `false` | `./helm/values.yaml` |
|
||||
| `CHART_PATH` | <p>Path to the Helm chart</p> | `false` | `./helm` |
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
|
||||
<!-- action-docs-runs source="action.yml" -->
|
||||
## Runs
|
||||
|
||||
This action is a `composite` action.
|
||||
<!-- action-docs-runs source="action.yml" -->
|
||||
@@ -0,0 +1,34 @@
|
||||
name: Helm Template Deployment
|
||||
description: Template a Helm chart for a deployment in a Kubernetes cluster
|
||||
inputs:
|
||||
DEPLOYMENT_NAME:
|
||||
description: "The Kubernetes Deployment to update"
|
||||
required: true
|
||||
DEPLOYMENT_NAMESPACE:
|
||||
description: "The Kubernetes namespace of the Deployment"
|
||||
required: true
|
||||
IMAGE_PATH:
|
||||
description: "The registry path to the image"
|
||||
required: true
|
||||
IMAGE_TAG:
|
||||
description: "The image tag to deploy"
|
||||
required: true
|
||||
CONTAINER_NAME:
|
||||
description: "The container component to update"
|
||||
required: true
|
||||
VALUES_FILE:
|
||||
description: "The values file to use"
|
||||
default: "./helm/values.yaml"
|
||||
CHART_PATH:
|
||||
description: "Path to the Helm chart"
|
||||
default: "./helm"
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Helm Template
|
||||
shell: sh
|
||||
run: |
|
||||
CMD="helm template ${{ inputs.DEPLOYMENT_NAME }} ${{ inputs.CHART_PATH }} -n ${{ inputs.DEPLOYMENT_NAMESPACE }} --values ${{ inputs.VALUES_FILE }} --set deploy.${{ inputs.CONTAINER_NAME }}.tag=${{ inputs.IMAGE_TAG }} --set image.repository=${{ inputs.IMAGE_PATH }}"
|
||||
echo "Running: $CMD"
|
||||
eval "$CMD"
|
||||
@@ -0,0 +1,26 @@
|
||||
# Helm Upgrade
|
||||
|
||||
<!-- action-docs-description source="action.yml" -->
|
||||
## Description
|
||||
|
||||
Login to an OCI registry, update chart dependencies, and run helm upgrade for the chart in the current directory
|
||||
<!-- action-docs-description source="action.yml" -->
|
||||
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
## Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| --- | --- | --- | --- |
|
||||
| `DEPLOYMENT_NAME` | <p>The Helm release name and target namespace</p> | `true` | `""` |
|
||||
| `REGISTRY` | <p>OCI registry hostname for helm dependency login</p> | `true` | `""` |
|
||||
| `REGISTRY_USERNAME` | <p>Username for OCI registry login</p> | `true` | `""` |
|
||||
| `REGISTRY_TOKEN` | <p>Token for OCI registry login</p> | `true` | `""` |
|
||||
| `CHART_PATH` | <p>Path to the Helm chart</p> | `false` | `./helm` |
|
||||
| `VALUES_FILE` | <p>The values file to use</p> | `false` | `./helm/values.yaml` |
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
|
||||
<!-- action-docs-runs source="action.yml" -->
|
||||
## Runs
|
||||
|
||||
This action is a `composite` action.
|
||||
<!-- action-docs-runs source="action.yml" -->
|
||||
@@ -0,0 +1,43 @@
|
||||
name: Helm Upgrade
|
||||
description: Login to an OCI registry, update chart dependencies, and run helm upgrade for the chart in the current directory
|
||||
inputs:
|
||||
DEPLOYMENT_NAME:
|
||||
description: "The Helm release name and target namespace"
|
||||
required: true
|
||||
REGISTRY:
|
||||
description: "OCI registry hostname for helm dependency login"
|
||||
required: true
|
||||
REGISTRY_USERNAME:
|
||||
description: "Username for OCI registry login"
|
||||
required: true
|
||||
REGISTRY_TOKEN:
|
||||
description: "Token for OCI registry login"
|
||||
required: true
|
||||
CHART_PATH:
|
||||
description: "Path to the Helm chart"
|
||||
default: "./helm"
|
||||
VALUES_FILE:
|
||||
description: "The values file to use"
|
||||
default: "./helm/values.yaml"
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Helm OCI Login
|
||||
shell: sh
|
||||
run: |
|
||||
echo "${{ inputs.REGISTRY_TOKEN }}" | helm registry login ${{ inputs.REGISTRY }} \
|
||||
--username ${{ inputs.REGISTRY_USERNAME }} \
|
||||
--password-stdin
|
||||
|
||||
- name: Helm Upgrade
|
||||
shell: sh
|
||||
run: |
|
||||
helm dependency update ${{ inputs.CHART_PATH }}
|
||||
echo "Running: helm upgrade ${{ inputs.DEPLOYMENT_NAME }} ${{ inputs.CHART_PATH }} -n ${{ inputs.DEPLOYMENT_NAME }} --values ${{ inputs.VALUES_FILE }}"
|
||||
helm upgrade ${{ inputs.DEPLOYMENT_NAME }} ${{ inputs.CHART_PATH }} -n ${{ inputs.DEPLOYMENT_NAME }} --values ${{ inputs.VALUES_FILE }}
|
||||
|
||||
- name: Remove kubeconfig
|
||||
if: always()
|
||||
shell: sh
|
||||
run: rm -f ~/.kube/config
|
||||
Reference in New Issue
Block a user