Skip to content

Instantly share code, notes, and snippets.

View nivogt's full-sized avatar

Nicolas Vogt nivogt

View GitHub Profile
@nivogt
nivogt / packer.json
Created May 8, 2021 12:05
packer.json
{
"builders": [
{
"type": "vsphere-iso",
"vcenter_server": "{{user `vsphere-server`}}",
"username": "{{user `vsphere-user`}}",
"password": "{{user `vsphere-password`}}",
"insecure_connection": "true",
"datacenter": "{{user `vsphere-datacenter`}}",
@nivogt
nivogt / packer.j2
Created May 8, 2021 12:06
packer.json
{
"builders": [
{
"type": "vsphere-iso",
"vcenter_server": "{{user `vsphere-server`}}",
"username": "{{user `vsphere-user`}}",
"password": "{{user `vsphere-password`}}",
"insecure_connection": "true",
"datacenter": "{{user `vsphere-datacenter`}}",
@nivogt
nivogt / packer.j2
Created May 8, 2021 12:07
packer.json
{
"builders": [
{
"type": "vsphere-iso",
"vcenter_server": "{{user `vsphere-server`}}",
"username": "{{user `vsphere-user`}}",
"password": "{{user `vsphere-password`}}",
"insecure_connection": "true",
"datacenter": "{{user `vsphere-datacenter`}}",
@nivogt
nivogt / Gen-policy.sh
Last active January 3, 2022 09:44
Generate iam permission from terraform trace
#!/bin/bash
INPUT_FILE=*.log
OUTPUT_FILE=policy.json
# get statements
# group all permissions by group into one statement block
# eg. ec2:CreateInstance and ec2:DeleteInstance will be in the same statement
STATEMENTS=$(grep "DEBUG: Request" $INPUT_FILE |awk '{print $(NF-1)}' | awk -F "/" '{print $1}' | sort | uniq )
LAST_STATEMENT=$(echo $STATEMENTS | awk '{print $NF}')
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: cicd-spot
region: my_region
managedNodeGroups:
- name: spot-ng-1
instanceTypes: [ "t2.medium", "t3.medium" ]
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-ssh-known-hosts-cm
namespace: argocd
labels:
app.kubernetes.io/name: argocd-cm
app.kubernetes.io/part-of: argocd
data:
ssh_known_hosts: |
---
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
namespace: argocd
labels:
app.kubernetes.io/name: argocd-cm
app.kubernetes.io/part-of: argocd
data:
#
# Helm Repositories
# Non standard Helm Chart repositories have to be registered
# Each repository must have 'url', 'type' and 'name' fields
#
---
apiVersion: v1
kind: Secret
metadata:
name: prometheus-helm-repo
# personal helm repository
apiVersion: v1
kind: Secret
metadata:
name: nvogt-helm
namespace: argocd
labels:
argocd.argoproj.io/secret-type: repository
stringData:
url: https://nivogt.github.io/ghostblog/
apiVersion: meta.pkg.crossplane.io/v1
kind: Configuration
metadata:
name: eks-cluster-composition
annotations:
provider: aws
spec:
crossplane:
version: ">=v1.0.0"
dependsOn: