Skip to content

Instantly share code, notes, and snippets.

apiVersion: apps/v1
kind: Deployment
metadata:
name: doks-debug
namespace: kube-system
labels:
app: doks-debug
spec:
replicas: 1
selector:
package main
import (
"fmt"
"os"
"golang.org/x/sync/errgroup"
)
func main() {
nodeNames := []string{"host-1", "host-2", "host-3"}
apiVersion: apiserver.config.k8s.io/v1
kind: EncryptionConfiguration
resources:
- resources:
- secrets
providers:
- aescbc:
keys:
- name: key1
secret: boo
@varshavaradarajan
varshavaradarajan / agent.yaml
Last active May 20, 2019 19:46
This is the yaml file that can be used with the elastic profile for the k8s plugin. This downloads kubectl and helm and makes it available for gocd agent to deploy to a cluster.
apiVersion: v1
kind: Pod
metadata:
name: gocd-agent
labels:
app: web
spec:
volumes:
- name: kubectl-and-helm
emptyDir: {}
#! /bin/bash
apk --no-cache upgrade && apk add openssl bash
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
export HELM_INSTALL_DIR="/download"
echo "export PATH=$PATH:$HELM_INSTALL_DIR" >> ~/.profile
source ~/.profile
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<style>
img {
height: 75%;
display: block;
margin: auto;
}
ssh-keygen
ssh-keygen -f ~/.ssh/id_rsa.pub -e -m PKCS8 > id_rsa.pem.pub
echo 'hello world' > foo.txt
sudo apt-get install openssl
curl https://raw.githubusercontent.com/kennethreitz/pipenv/master/get-pipenv.py | sudo python3
pipenv install requests
openssl rsautl -encrypt -pubin -inkey id_rsa.pem.pub -ssl -in foo.txt -out foo.txt.enc
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5
from Crypto.Hash import SHA
from base64 import b64decode
import requests
key = 'need-to-populate'
rsa_key = RSA.importKey(key)
verifier = PKCS1_v1_5.new(rsa_key)
raw_cipher_data = b64decode(f.open('foo.txt.enc'))
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {
"name": "test-pod-json",
"labels": {
"app": "gocd-agent"
},
"annotations": {
"annotation-key": "my-fancy-annotation-value"
apiVersion: v1
kind: Pod
metadata:
name: pod-name-prefix-{{ POD_POSTFIX }}
labels:
app: web
spec:
containers:
- name: gocd-agent-container-{{ CONTAINER_POSTFIX }}
image: gocd/gocd-agent-alpine-3.8:v18.12.0