Skip to content

Instantly share code, notes, and snippets.

View lodotek's full-sized avatar

Christopher Montes lodotek

View GitHub Profile
@lodotek
lodotek / sealedsecrets.yaml
Created June 6, 2023 17:24
Helm Templated Sealed Secrets
{{- if and (.Values.sealedSecret) (.Capabilities.APIVersions.Has "bitnami.com/v1alpha1") }}
{{- range $nameSuffix, $config := .Values.sealedSecret.files }}
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
name: {{ template "application.name" $ }}-{{ $nameSuffix }}
namespace: {{ template "application.namespace" $ }}
labels:
{{- include "application.labels" $ | nindent 4 }}
{{- if $.Values.sealedSecret.additionalLabels }}
@lodotek
lodotek / sealed-secrets.yaml
Created June 6, 2023 17:20
sealed-secrets.yaml
{{- range $key, $value := .Values.sealedSecrets }}
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
name: {{ $key }}
namespace: {{ $.Release.Namespace }}
spec:
encryptedData:
{{ $value | toYaml | indent 4 }}
@lodotek
lodotek / task.sh
Last active January 7, 2022 20:01
aws eks task script (WIP) for concourse
if [ -n "${CLUSTER_NAME}" ]; then
set -- "$@" --name "${CLUSTER_NAME}"
fi
if [ -n "${AWS_REGION}" ]; then
set -- "$@" --region "${AWS_REGION}"
fi
if [ -n "${AWS_PROFILE}" ]; then
set -- "$@" --profile "${AWS_PROFILE}"
fi
if [ -n "${KUBECONFIG_FILE_PATH}" ]; then
@lodotek
lodotek / argocd-cm.yml
Created December 10, 2021 15:57
argocd-cm.yml - ytt / kbld
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.subset({"kind":"ConfigMap","metadata":{"name":"argocd-cm"}})
#@overlay/match-child-defaults missing_ok=True
---
data:
configManagementPlugins: |
- name: ytt
generate:
command:
@lodotek
lodotek / argocd-repo-server.yml
Created December 10, 2021 15:56
argocd-repo-server.yml - ytt
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.subset({"kind":"Deployment","metadata":{"name":"argocd-repo-server"}})
---
spec:
template:
spec:
volumes:
#@overlay/append
- name: carvel
@lodotek
lodotek / commit-message-checker-gh-workflow.yml
Created September 7, 2021 16:15
GH Action Pre-Commit msg check workflow
---
name: CI
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check commit message
uses: gsactions/commit-message-checker@v1
Tue May 18 19:55:32 UTC 2021
@lodotek
lodotek / ansible-role-test.sh
Created June 11, 2018 17:20
Ansible Role Test Shim Script
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
# - test_idempotence: whether to test playbook's idempotence (default = true)
@lodotek
lodotek / awc-ecs-access-to-aws-efs.md
Created February 15, 2018 23:33 — forked from duluca/awc-ecs-access-to-aws-efs.md
Step-by-step Instructions to Setup an AWS ECS Cluster

Configuring AWS ECS to have access to AWS EFS

If you would like to persist data from your ECS containers, i.e. hosting databases like MySQL or MongoDB with Docker, you need to ensure that you can mount the data directory of the database in the container to volume that's not going to dissappear when your container or worse yet, the EC2 instance that hosts your containers, is restarted or scaled up or down for any reason.

Don't know how to create your own AWS ECS Cluster? Go here!

New Cluster

Sadly the EC2 provisioning process doesn't allow you to configure EFS during the initial config. After your create your cluster, follow the guide below.

New Task Definition for Web App

If you're using an Alpine-based Node server like duluca/minimal-node-web-server follow this guide:

@lodotek
lodotek / awc-ecs-access-to-aws-efs.md
Created February 15, 2018 23:33 — forked from duluca/awc-ecs-access-to-aws-efs.md
Step-by-step Instructions to Setup an AWS ECS Cluster

Configuring AWS ECS to have access to AWS EFS

If you would like to persist data from your ECS containers, i.e. hosting databases like MySQL or MongoDB with Docker, you need to ensure that you can mount the data directory of the database in the container to volume that's not going to dissappear when your container or worse yet, the EC2 instance that hosts your containers, is restarted or scaled up or down for any reason.

Don't know how to create your own AWS ECS Cluster? Go here!

New Cluster

Sadly the EC2 provisioning process doesn't allow you to configure EFS during the initial config. After your create your cluster, follow the guide below.

New Task Definition for Web App

If you're using an Alpine-based Node server like duluca/minimal-node-web-server follow this guide: