Skip to content

Instantly share code, notes, and snippets.

View Neutrollized's full-sized avatar
🏠
Working from home

Glen Yu Neutrollized

🏠
Working from home
View GitHub Profile
@Neutrollized
Neutrollized / vault-agent.hcl
Last active February 13, 2024 02:20
Medium: Securing your workflow using Vault Agent with GCP Auth Method on HashiCorp Vault
vault {
address = "https://10.234.56.78:8200"
retry {
num_retries = 3
}
}
auto_auth {
method "gcp" {
mount_path = "auth/my-project-123"
@Neutrollized
Neutrollized / rbenv_macos_bigsur.md
Last active August 18, 2023 12:35
Installing Ruby with rbenv on MacOS Big Sur

Errors/Problems with Install

In attempting to install Ruby with rbenv, I ran into the following build failures:

BUILD FAILED (macOS 11.2.3 using ruby-build 20210423)

Inspect or clean up the working tree at /var/folders/58/16lnyx815c183j6wzcbl_thc0000gn/T/ruby-build.20210426232453.81982.XfAg0C
Results logged to /var/folders/58/16lnyx815c183j6wzcbl_thc0000gn/T/ruby-build.20210426232453.81982.log

Last 10 log lines:
 ^
@Neutrollized
Neutrollized / kaniko-executor-k8s-secret.yaml
Last active March 4, 2023 19:35
Medium: Workload Identity explained using kaniko
apiVersion: v1
kind: Pod
metadata:
name: kaniko-k8s-secret
spec:
containers:
- name: kaniko
image: gcr.io/kaniko-project/executor:v1.9.1
args: ["--dockerfile=Dockerfile",
"--context=gs://${GCS_BUCKET}/path/to/context.tar.gz",
@Neutrollized
Neutrollized / kaniko-executor-wi.yaml
Last active March 4, 2023 19:35
Medium: Workload Identity explained using kaniko
apiVersion: v1
kind: Pod
metadata:
name: kaniko-wi
spec:
containers:
- name: kaniko
image: gcr.io/kaniko-project/executor:v1.9.1
args: ["--dockerfile=Dockerfile",
"--context=gs://${GCS_BUCKET}/path/to/context.tar.gz",
@Neutrollized
Neutrollized / productpage-gateway.yaml
Created February 28, 2023 00:47
Medium: Getting started with Anthos Service Mesh for GKE
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: productpage-gateway
namespace: bookinfo
spec:
selector:
istio: ingressgateway
servers:
- port:
@Neutrollized
Neutrollized / istio-ingressgateway.yaml
Created February 28, 2023 00:25
Medium: Getting started with Anthos Service Mesh for GKE
apiVersion: apps/v1
kind: Deployment
metadata:
name: istio-ingressgateway
spec:
replicas: 2
selector:
matchLabels:
app: istio-ingressgateway
istio: ingressgateway
@Neutrollized
Neutrollized / cloudbuild.yaml
Last active February 6, 2023 18:46
Medium: Deploying HashiCorp Vault on Cloud Run using Cloud Build
---
steps:
- id: 'Lint Dockerfile'
name: 'ghcr.io/hadolint/hadolint'
entrypoint: '/bin/hadolint'
args: ['cloud-run/Dockerfile']
- id: 'Build container image'
name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', '${_GAR_REGION}-docker.pkg.dev/${PROJECT_ID}/${_GAR_REPO_NAME}/vault-server:${COMMIT_SHA}', '-f', 'cloud-run/Dockerfile', '.']
- id: 'Image efficiency scan'
@Neutrollized
Neutrollized / membrane-proxy.nomad
Last active February 4, 2023 15:53
Medium: Migrating off of Pivotal Cloud Foundry? Consider HashiCorp Nomad!
locals {
membrane_version = "5.0.1"
}
job "membrane-proxy" {
datacenters = ["gcp-test"]
priority = 80
group "membrane" {
network {
@Neutrollized
Neutrollized / minecraft.nomad
Last active February 1, 2023 01:24
Medium: Migrating off of Pivotal Cloud Foundry? Consider HashiCorp Nomad!
job "minecraft" {
datacenters = ["gcp-test"]
priority = 80
group "mc-server" {
network {
port "access" { static = 25565 }
}
# reserved disk
@Neutrollized
Neutrollized / spring-music.nomad
Last active January 31, 2023 16:21
Medium: Migrating off of Pivotal Cloud Foundry? Consider HashiCorp Nomad!
job "spring-music" {
datacenters = ["gcp-test"]
priority = 80
group "spring-music" {
network {
port "access" { static = 28080 }
}
task "spring-music" {