Skip to content

Instantly share code, notes, and snippets.

@perrefe
perrefe / policies.jsonl
Last active June 21, 2017 20:51
ABAC Policies for kube-dns, ingress and kube-lego
{"apiVersion": "abac.authorization.kubernetes.io/v1beta1", "kind": "Policy", "spec": {"user":"kube-admin", "namespace": "*", "resource": "*", "apiGroup": "*", "nonResourcePath": "*"}}
{"apiVersion": "abac.authorization.kubernetes.io/v1beta1", "kind": "Policy", "spec": {"user":"system:serviceaccount:kube-system:kube-dns", "namespace": "*", "resource": "endpoints"}}
{"apiVersion": "abac.authorization.kubernetes.io/v1beta1", "kind": "Policy", "spec": {"user":"system:serviceaccount:kube-system:kube-dns", "namespace": "*", "resource": "services"}}
{"apiVersion": "abac.authorization.kubernetes.io/v1beta1", "kind": "Policy", "spec": {"user":"system:serviceaccount:nginx-ingress:ingress", "namespace": "*", "resource": "*", "apiGroup": "*", "nonResourcePath": "*", "readonly": true}}
{"apiVersion": "abac.authorization.kubernetes.io/v1beta1", "kind": "Policy", "spec": {"user":"system:serviceaccount:nginx-ingress:ingress", "namespace": "nginx-ingress", "resource": "configmaps"}}
{"apiVersion": "abac.authorization.kubernet

Keybase proof

I hereby claim:

  • I am perrefe on github.
  • I am perrefe (https://keybase.io/perrefe) on keybase.
  • I have a public key ASBA-CUPHdflJpQ2BALcUD3mRV-BxbCz5_gvW0D7HJ_lAwo

To claim this, I am signing this object:

@perrefe
perrefe / weblogicDataSources
Created January 20, 2014 21:46
Script para crear datasources en weblogic utilizando la consola WLST
connect('weblogic', 'weblogic1', 't3://10.151.92.113:7001')
edit()
startEdit()
server = getMBean('Servers/server1')
ds1 = {'name': 'ds1', 'jndi': ['jdbc/ds1'], 'url': 'jdbc:oracle:thin:@127.0.0.1:1521:XE', 'user': 'dbuser', 'password': 'dbpass'}
ds2 = {'name': 'ds2', 'jndi': ['jdbc/ds1'], 'url': 'jdbc:oracle:thin:@127.0.0.1:1521:XE', 'user': 'dbuser', 'password': 'dbpass'}
ds3 = {'name': 'ds3', 'jndi': ['jdbc/ds1'], 'url': 'jdbc:oracle:thin:@127.0.0.1:1521:XE', 'user': 'dbuser', 'password': 'dbpass'}
datasources = [ds1, ds2, ds3]