Skip to content

Instantly share code, notes, and snippets.

View onefoursix's full-sized avatar

Mark Brooks onefoursix

View GitHub Profile
@onefoursix
onefoursix / tiller-cluster-admin-rbac.yaml
Created October 12, 2019 17:57
cluster-admin rbac for helm/tiller
apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: tiller
@onefoursix
onefoursix / tiller-streamsets-role.yaml
Created October 12, 2019 18:08
role for tiller in streamsets namespace
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: tiller-manager
namespace: streamsets
rules:
- apiGroups: ["", "batch", "extensions", "apps"]
resources: ["*"]
verbs: ["*"]
@onefoursix
onefoursix / tiller-role-binding.yaml
Last active October 12, 2019 18:14
tiller streamsets role binding
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: tiller-binding
namespace: streamsets
subjects:
- kind: ServiceAccount
name: tiller
namespace: streamsets
roleRef:
@onefoursix
onefoursix / control-agent-minishift-admin-prerequisites.yaml
Created January 4, 2020 05:17
control-agent-minishift-admin-prerequisites.yaml
apiVersion: v1
kind: Namespace
metadata:
name: ns1
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: control-agent-deployer-role
namespace: ns1
@onefoursix
onefoursix / control-agent-gke-admin-sa-prerequisites.yaml
Created January 4, 2020 06:47
control-agent-gke-admin-sa-prerequisites.yaml
apiVersion: v1
kind: Namespace
metadata:
name: ns1
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: control-agent-deployer
namespace: ns1
#!/usr/bin/env bash
# This extracts a Service Account Token from a previously created
# ServiceAccount that has sufficient RBAC permissions to deploy
# a Control Agent. The token is then set in a kubeconfig file
# a non-admin user can use to deploy a Control Agent. cluster-admin
# role is required to execute this script
# This script is based entirely on innovia/kubernetes_add_service_account_kubeconfig.sh
# located at https://gist.github.com/innovia/fbba8259042f71db98ea8d4ad19bd708
@onefoursix
onefoursix / auth-sdc-deploy-svc-ingress.yaml
Created February 14, 2020 07:25
Deployment, Service and Ingress for an Authoring SDC on Minikube
apiVersion: v1
kind: List
items:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: auth-sdc
namespace: ns2
labels:
app : auth-sdc
@onefoursix
onefoursix / authoring-sdc-deployment-svc-ingress-broken.yaml
Created February 14, 2020 07:50
A broken example of a Deployment, Service and Ingress for an Authoring SDC on Minikube for a debugging exercise
apiVersion: v1
kind: List
items:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: auth-sdc
namespace: ns2
labels:
app : my-auth-sdc
@onefoursix
onefoursix / update-jdbc.sh
Created March 18, 2020 21:04
Script to set database connection info in *-app.properties files for StreamSets Control Hub
declare -a dbs=("jobrunner" "messaging" "notification" "pipelinestore" "policy" "provisioning" "reporting" "scheduler" "sdp_classification" "security" "sla" "timeseries" "topology" "dynamic_preview")
for i in "${dbs[@]}"
do
sed -i "s/^db.openjpa.ConnectionURL=/db.openjpa.ConnectionURL=jdbc\:mysql\:\/\/localhost:3306\/${i}?useSSL=false/" ${i}-app.properties
sed -i "s/^db.openjpa.ConnectionUserName=/db.openjpa.ConnectionUserName=sch/" ${i}-app.properties
sed -i "s/^db.openjpa.ConnectionPassword=/db.openjpa.ConnectionPassword=Mysql12345!/" ${i}-app.properties
done
@onefoursix
onefoursix / sdc-deployment-nfs.yaml
Created April 17, 2020 00:47
SDC Deployment YAML with NFS-based stage-libs and resources
apiVersion: apps/v1
kind: Deployment
metadata:
name: datacollector-deployment
namespace: ns1
spec:
replicas: 1
selector:
matchLabels:
app: datacollector-deployment