Skip to content

Instantly share code, notes, and snippets.

@wshihadeh
wshihadeh / Chart.yaml
Created February 23, 2021 11:08
Chart.yaml
apiVersion: The chart API version (required)
name: The name of the chart (required)
version: A SemVer 2 version (required)
kubeVersion: A SemVer range of compatible Kubernetes versions (optional)
description: A single-sentence description of this project (optional)
type: The type of the chart (optional)
keywords:
- A list of keywords about this project (optional)
home: The URL of this projects home page (optional)
sources:
@wshihadeh
wshihadeh / helm-ci.yaml
Created February 22, 2021 16:00
Helm CI Integration
name: Lint and Test Helm chart
on: pull_request
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
@wshihadeh
wshihadeh / deployment.yaml
Created February 22, 2021 12:14
Deployment Unit Tests
suite: Deployment configuration
templates:
- deployment.yaml
tests:
- it: should have 1 replica by default
asserts:
- equal:
path: spec.replicas
value: 1
- it: should have the specified amount of replicas when specified via values
@wshihadeh
wshihadeh / action.yaml
Created August 16, 2020 16:27
DeployDocker
- name: Deploy to Docker Host
uses: wshihadeh/docker-deployment-action@v1
with:
remote_docker_host: user@myswarm.com
ssh_private_key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
ssh_public_key: ${{ secrets.DOCKER_SSH_PUBLIC_KEY }}
deployment_mode: docker-compose
copy_stack_file: true
deploy_path: /root/my-deployment
stack_file_name: docker-compose.yaml
@wshihadeh
wshihadeh / action.yaml
Created August 16, 2020 16:26
DeploySwarm
- name: Deploy to Docker swarm
uses: wshihadeh/docker-deployment-action@v1
with:
remote_docker_host: user@myswarm.com
ssh_private_key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
ssh_public_key: ${{ secrets.DOCKER_SSH_PUBLIC_KEY }}
deployment_mode: docker-swarm
copy_stack_file: true
deploy_path: /root/my-deployment
stack_file_name: docker-stack.yaml
@wshihadeh
wshihadeh / action.yaml
Created August 16, 2020 16:24
DeployDocker
- name: Deploy to Docker Host
uses: wshihadeh/docker-deployment-action@v1
with:
remote_docker_host: user@myswarm.com
ssh_private_key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
ssh_public_key: ${{ secrets.DOCKER_SSH_PUBLIC_KEY }}
deployment_mode: docker-compose
args: up -d
pre_deployment_command_args: 'bundle exec rake db:migrate'
docker_prune: 'true'
@wshihadeh
wshihadeh / action.yaml
Created August 16, 2020 16:23
DeploySwarm
- name: Deploy to Docker swarm
uses: wshihadeh/docker-deployment-action@v1
with:
remote_docker_host: user@myswarm.com
ssh_private_key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
ssh_public_key: ${{ secrets.DOCKER_SSH_PUBLIC_KEY }}
deployment_mode: docker-swarm
args: my_applicaion_stack_name
<match pattern>
@type key_value_parser
key log
remove_key true
remove_prefix /^[^ ]+\s[^ ]+/
use_regex true
filtered_keys key,gkey
</match>
# Input Data
<match pattern>
@type key_value_parser
key log
remove_key true
remove_prefix /^[^ ]+\s[^ ]+/
use_regex true
filtered_keys none
filtered_keys_regex /^sub_[a-zA-Z_0-9]+/
</match>
<filter key-val.**>
@type key_value_parser
</filter>