Skip to content

Commit

Permalink
add makefile targets to build/deploy webhook
Browse files Browse the repository at this point in the history
uses kustomize with pre-generated keys
  • Loading branch information
Jeff Peeler committed Aug 15, 2018
1 parent 1293a7f commit 2ee3963
Show file tree
Hide file tree
Showing 12 changed files with 208 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,18 @@ docker-build: test
# Push the docker image
docker-push:
docker push ${IMG}

#
# Mutating webhook targets from here below
#
deploy-webhook:
kubectl apply -f webhook/rbac/
kustomize build webhook/kustomize-config | kubectl apply -f -

undeploy-webhook:
kustomize build webhook/kustomize-config | kubectl delete -f -
kubectl delete -f webhook/rbac/
docker-build-webhook:
CGO_ENABLED=0 GOOS=linux go build -o ./webhook/webhook ./webhook/
docker build --no-cache -t docker.io/service-catalog/admission-webhook ./webhook/
rm -rf ./webhook/webhook
13 changes: 13 additions & 0 deletions webhook/kustomize-config/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace: podpreset-crd-system

resources:
- ../deployment.yaml

patches:
- webhook_cabundle_patch.yaml

secretGenerator:
- name: podpreset-service-tls
commands:
tls.crt: "cat ../pki/podpreset-service.pem"
tls.key: "cat ../pki/podpreset-service-key.pem"
9 changes: 9 additions & 0 deletions webhook/kustomize-config/webhook_cabundle_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
name: podpreset-webook-configuration
webhooks:
- name: podpresets.settings.servicecatalog.k8s.io
clientConfig:
# base64 -w 0 ca.pem
caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUR6RENDQXJTZ0F3SUJBZ0lVTXhxc1BQTlgzUnhYZTR2ODRkekwydDZyalVnd0RRWUpLb1pJaHZjTkFRRUwKQlFBd2ZqRUxNQWtHQTFVRUJoTUNWVk14RnpBVkJnTlZCQWdURGxOdmR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lZIUk1CQWY4RUJUQURBUUgvTUIwRwpBMVVkRGdRV0JCUm9tRDJwdXQ0c0tKeXFEZTJweHo3Wm1jZFRMakFOQmdrcWhraUc5dzBCQVFzRkFBT0NBUUVBCm8vUUMyZ3hDWmgxc1FDVVV0TnJUckpNZEtoQ1NmeUdvTUpZNWo4OWVBOUhTdWw5R20yZ1dDLzVZWmlldmxQMDMKQjBlZ2tRd1Z4MkNsVjFBOWRLTmFEYTBodmQzazdYenl1WTFkdlNQZWZoSWN2SGZVSklSczQzK0V4NmMxM0dkSgpiRDJZUC9NYUt2K3NQMll5T0ZLYUZvWDFjUVRqellSZDhaSk8rdEczazZENXRDLzVQRTFHaVFnbHZiSVgrM1E5CmFXQU9wc3F6NU1pU1dDMmpXSnUwUFByYkNyS2ZoSVJLZTN2VU5IV29iK3NyaXZ3VkZIQ0VFRkMzaW5YdWlYaG8KSitPSndpUElnL0tsOGpCQkUrUTVjS3JKc3N2VUFpbGxMWVNKeWdmMVlCcVFmeWlWWGJBY0xaRVlDN2pYdTZ2UQp2ZkJiU21DdUlMWnRvYUNzL2dESzN3PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
27 changes: 27 additions & 0 deletions webhook/pki/ca-key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAzpMFPoYLFDtihmIxFAJvaB/16k14IyFmmombF71FsYNNTeae
h8Nna3LoXcqH5CbsBsQdJm6bv9hb/E4cXa+nYk3WnbDznZYkzrcpu38VUlKRdiQ5
3omqc5OADqWdo8si88dPCe6GnVzBFGAi58kPzv06PSI7TuXclNhJSce6xTzEYoQ/
kCrOCnIHmCo6Odm7vgsq0az2x7OMnscjk2HU30QRBxpBuaDDO3ik4qoXT1RMXD4c
CGvEeCr37wgBkQbdGOdnMFauURFqmv2bKulkV7JQa0d8kUu/Kxzulbcw2JeNJJJx
M9M305TusbYXXClRDmAROz1Ec+H68DRCu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o
kxX/5QKBgE/uX/20TP3tDeUxCzTX+4H0IbZxxU4zl9d/MvMJLq/NE6EhVtXUd2w5
mNBWIjGnzTQq1LwB6BotXsTfIBDlzHL1jcBT8koAHrmF7rscBH2oVS5KqbyxwJpA
EXrac/Cuz7Acm4TJNex4vgY17Y/C65EpkQuGdsCYdwRzAq0XZAHh
-----END RSA PRIVATE KEY-----
17 changes: 17 additions & 0 deletions webhook/pki/ca.csr
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-----BEGIN CERTIFICATE REQUEST-----
MIICwzCCAasCAQAwfjELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDlNvdXRoIENhcm9s
aW5hMREwDwYDVQQHEwhDb2x1bWJpYTEaMBgGA1UEChMRcG9kcHJlc2V0LXNlcnZp
Y2UxCzAJBgNVBAsTAkNBMRowGAYDVQQDExFwb2RwcmVzZXQtc2VydmljZTCCASIw
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6TBT6GCxQ7YoZiMRQCb2gf9epN
eCMhZpqJmxe9RbGDTU3mnofDZ2ty6F3Kh+Qm7AbEHSZum7/YW/xOHF2vp2JN1p2w
852WJM63Kbt/FVJSkXYkOd6JqnOTgA6lnaPLIvPHTwnuhp1cwRRgIufJD879Oj0i
O07l3JTYSUnHusU8xGKEP5AqzgpyB5gqOjnZu74LKtGs9sezjJ7HI5Nh1N9EEQca
Qbmgwzt4pOKqF09UTFw+HAhrxHgq9+8IAZEG3RjnZzBWrlERapr9myrpZFeyUGtH
fJFLvysc7pW3MNiXjSSScTPTN9OU7rG2F1wpUQ5gETs9RHPh+vA0QrrlUTECAwEA
AaAAMA0GCSqGSIb3DQEBCwUAA4IBAQB7qSIHo/pj3Hg4kDIP1YbDFKKSZxcxsNyn
gbdYinmWnjbNtZRs4zCLCj16mdk4b82f9wV4FL2nkGegvpgCzoeqsLdM+s0N0hi1
yahqezKTLmgiIK63X7RgPfbG8E+EXRKw2en1dY3AM09rgfxZ/br9YqhcMUw67k/U
6xaa2gayQCEZS+GTgxIm+TJDbZ51BGpxbrDO842VT0O68hTT7pue8FBJWT4NwDVQ
hfcEI4O1Aa7jBln83/9MJNIm68mlqq2i1WklozMOhfqmVU8oAAZ8xxrbN2wZTDpj
mk49yjiX12DC1bX8b5WFgmWSyVQ9lA52tV32JICrtkXgrRcK/oxE
-----END CERTIFICATE REQUEST-----
23 changes: 23 additions & 0 deletions webhook/pki/ca.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-----BEGIN CERTIFICATE-----
MIIDzDCCArSgAwIBAgIUMxqsPPNX3RxXe4v84dzL2t6rjUgwDQYJKoZIhvcNAQEL
BQAwfjELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDlNvdXRoIENhcm9saW5hMREwDwYD
VQQHEwhDb2x1bWJpYTEaMBgGA1UEChMRcG9kcHJlc2V0LXNlcnZpY2UxCzAJBgNV
BAsTAkNBMRowGAYDVQQDExFwb2RwcmVzZXQtc2VydmljZTAeFw0xODA4MDExODMy
MDBaFw0yMzA3MzExODMyMDBaMH4xCzAJBgNVBAYTAlVTMRcwFQYDVQQIEw5Tb3V0
aCBDYXJvbGluYTERMA8GA1UEBxMIQ29sdW1iaWExGjAYBgNVBAoTEXBvZHByZXNl
dC1zZXJ2aWNlMQswCQYDVQQLEwJDQTEaMBgGA1UEAxMRcG9kcHJlc2V0LXNlcnZp
Y2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDOkwU+hgsUO2KGYjEU
Am9oH/XqTXgjIWaaiZsXvUWxg01N5p6Hw2drcuhdyofkJuwGxB0mbpu/2Fv8Thxd
r6diTdadsPOdliTOtym7fxVSUpF2JDneiapzk4AOpZ2jyyLzx08J7oadXMEUYCLn
yQ/O/To9IjtO5dyU2ElJx7rFPMRihD+QKs4KcgeYKjo52bu+CyrRrPbHs4yexyOT
YdTfRBEHGkG5oMM7eKTiqhdPVExcPhwIa8R4KvfvCAGRBt0Y52cwVq5REWqa/Zsq
6WRXslBrR3yRS78rHO6VtzDYl40kknEz0zfTlO6xthdcKVEOYBE7PURz4frwNEK6
5VExAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0G
A1UdDgQWBBRomD2put4sKJyqDe2pxz7ZmcdTLjANBgkqhkiG9w0BAQsFAAOCAQEA
o/QC2gxCZh1sQCUUtNrTrJMdKhCSfyGoMJY5j89eA9HSul9Gm2gWC/5YZievlP03
B0egkQwVx2ClV1A9dKNaDa0hvd3k7XzyuY1dvSPefhIcvHfUJIRs43+Ex6c13GdJ
bD2YP/MaKv+sP2YyOFKaFoX1cQTjzYRd8ZJO+tG3k6D5tC/5PE1GiQglvbIX+3Q9
aWAOpsqz5MiSWC2jWJu0PPrbCrKfhIRKe3vUNHWob+srivwVFHCEEFC3inXuiXho
J+OJwiPIg/Kl8jBBE+Q5cKrJssvUAillLYSJygf1YBqQfyiVXbAcLZEYC7jXu6vQ
vfBbSmCuILZtoaCs/gDK3w==
-----END CERTIFICATE-----
1 change: 1 addition & 0 deletions webhook/pki/ca.pem.base64
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUR6RENDQXJTZ0F3SUJBZ0lVTXhxc1BQTlgzUnhYZTR2ODRkekwydDZyalVnd0RRWUpLb1pJaHZjTkFRRUwKQlFBd2ZqRUxNQWtHQTFVRUJoTUNWVk14RnpBVkJnTlZCQWdURGxOdmRYUm9JRU5oY205c2FXNWhNUkV3RHdZRApWUVFIRXdoRGIyeDFiV0pwWVRFYU1CZ0dBMVVFQ2hNUmNHOWtjSEpsYzJWMExYTmxjblpwWTJVeEN6QUpCZ05WCkJBc1RBa05CTVJvd0dBWURWUVFERXhGd2IyUndjbVZ6WlhRdGMyVnlkbWxqWlRBZUZ3MHhPREE0TURFeE9ETXkKTURCYUZ3MHlNekEzTXpFeE9ETXlNREJhTUg0eEN6QUpCZ05WQkFZVEFsVl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ZoSWN2SGZVSklSczQzK0V4NmMxM0dkSgpiRDJZUC9NYUt2K3NQMll5T0ZLYUZvWDFjUVRqellSZDhaSk8rdEczazZENXRDLzVQRTFHaVFnbHZiSVgrM1E5CmFXQU9wc3F6NU1pU1dDMmpXSnUwUFByYkNyS2ZoSVJLZTN2VU5IV29iK3NyaXZ3VkZIQ0VFRkMzaW5YdWlYaG8KSitPSndpUElnL0tsOGpCQkUrUTVjS3JKc3N2VUFpbGxMWVNKeWdmMVlCcVFmeWlWWGJBY0xaRVlDN2pYdTZ2UQp2ZkJiU21DdUlMWnRvYUNzL2dESzN3PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
27 changes: 27 additions & 0 deletions webhook/pki/podpreset-service-key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAsBYMBLQGKa5ibM8vzztPDd1GFtW/ozLEpn6rHS+XmLVp5uwR
7CJY7nadtS0rrKxQLaJ7mtAlPkKWIBmGkUNsgOVhuBKmR9uuPX7wjEeAkx/L2Rc7
w9EmF6CTQMR8A8q0Fxh0SsnB5xIvKsCTx6hxOct4+DuRuegRegF8asTDoWugNwUz
+hkRUyo2riWIWT7fe0l3+H2WdAhM9ppBg3TTVdofpRLZxxjZTM1PeLWVZkbD6ljr
bTMaxq1YmD9YGuTscNz9eVHdtbvRvrXcsottHR5Hufnub0ENHGgcOOMg79qum1Cw
1HN+yXBoJk6dzJ71S21DZ21d9jAZDLuh6cucOwIDAQABAoIBAQCg9ZZI2lLj2P8p
nX6DfSB3ePQvvXXu9WJjG1jJVg7KTdKfft2nL4KBgLYKvl60+dJU1LkOPAQ/VFis
wQiMUsilToiz3YBYIUy19AppAJdcZW1OZXmBNvcOE/9m7fS69pkGn5j2IFV6Jtos
x1qO4L+XaBKNPs6n1KXdE+yqIHD/ZMB+tQsu99t+oQh+/IwnsyY7wU9+8e8S7A7N
A+iAbEW5vnEw1V7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-service.csr
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-----BEGIN CERTIFICATE REQUEST-----
MIIDjjCCAnYCAQAwgZkxCzAJBgNVBAYTAlVTMRcwFQYDVQQIEw5Tb3V0aCBDYXJv
bGluYTERMA8GA1UEBxMIQ29sdW1iaWExGjAYBgNVBAoTEXBvZHByZXNldC1zZXJ2
aWNlMRowGAYDVQQLExFQb2RQcmVzZXQgV2ViaG9vazEmMCQGA1UEAxMdcG9kcHJl
c2V0LXNlcnZpY2UuZGVmYXVsdC5zdmMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQCwFgwEtAYprmJszy/PO08N3UYW1b+jMsSmfqsdL5eYtWnm7BHsIlju
dp21LSusrFAtonua0CU+QpYgGYaRQ2yA5WG4EqZH2649fvCMR4CTH8vZFzvD0SYX
oJNAxHwDyrQXGHRKycHnEi8qwJPHqHE5y3j4O5G56BF6AXxqxMOha6A3BTP6GRFT
KjauJYhZPt97SXf4fZZ0CEz2mkGDdNNV2h+lEtnHGNlMzU94tZVmRsPqWOttMxrG
rViYP1ga5Oxw3P15Ud21u9G+tdyyi20dHke5+e5vQQ0caBw44yDv2q6bULDUc37J
cGgmTp3MnvVLbUNnbV32MBkMu6Hpy5w7AgMBAAGgga4wgasGCSqGSIb3DQEJDjGB
nTCBmjCBlwYDVR0RBIGPMIGMghFwb2RwcmVzZXQtc2VydmljZYIdcG9kcHJlc2V0
LXNlcnZpY2Uua3ViZS1zeXN0ZW2CJnBvZHByZXNldC1zZXJ2aWNlLnBvZHByZXNl
dC1jcmQtc3lzdGVtgipwb2RwcmVzZXQtc2VydmljZS5wb2RwcmVzZXQtY3JkLXN5
c3RlbS5zdmOHBH8AAAEwDQYJKoZIhvcNAQELBQADggEBAFaEyrcXrJ5TghxNzOvM
NTU1qajQYcp+EJXQxjAz8vN9uDIVh8W+ZXhTi5hY7W2Dop8POoQj1qV6XMQpN+pN
W1t8izx3jHJZiGSCyKjXQYbRqkFK0bjJEnUcUfICL3CUQlbnFJqWwMLQVId587iW
tQHthwe0fyXb9TziUKb5awpEkRvbD4t2fBwdyJ+f/mUkjZyRkt7kn4cymTA6iIbw
pEGjQKMrCfVuzHrDeFzNZIe8BQwbBJcau0f2Y62ja9RdUj4vfz1T6yGMakhI2IVb
6ys1M0gbBg4jUva2eU2bo+XhaAYHVyWDOWBcqRRW1vNKU23YXhNndPkEoHZYj/k7
1n4=
-----END CERTIFICATE REQUEST-----
28 changes: 28 additions & 0 deletions webhook/pki/podpreset-service.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN CERTIFICATE-----
MIIEwzCCA6ugAwIBAgIUBhbsv6tofMHxPBYhJQpeuB4DRycwDQYJKoZIhvcNAQEL
BQAwfjELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDlNvdXRoIENhcm9saW5hMREwDwYD
VQQHEwhDb2x1bWJpYTEaMBgGA1UEChMRcG9kcHJlc2V0LXNlcnZpY2UxCzAJBgNV
BAsTAkNBMRowGAYDVQQDExFwb2RwcmVzZXQtc2VydmljZTAeFw0xODA4MDExODMy
MDBaFw0xOTA4MDExODMyMDBaMIGZMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOU291
dGggQ2Fyb2xpbmExETAPBgNVBAcTCENvbHVtYmlhMRowGAYDVQQKExFwb2RwcmVz
ZXQtc2VydmljZTEaMBgGA1UECxMRUG9kUHJlc2V0IFdlYmhvb2sxJjAkBgNVBAMT
HXBvZHByZXNldC1zZXJ2aWNlLmRlZmF1bHQuc3ZjMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEAsBYMBLQGKa5ibM8vzztPDd1GFtW/ozLEpn6rHS+XmLVp
5uwR7CJY7nadtS0rrKxQLaJ7mtAlPkKWIBmGkUNsgOVhuBKmR9uuPX7wjEeAkx/L
2Rc7w9EmF6CTQMR8A8q0Fxh0SsnB5xIvKsCTx6hxOct4+DuRuegRegF8asTDoWug
NwUz+hkRUyo2riWIWT7fe0l3+H2WdAhM9ppBg3TTVdofpRLZxxjZTM1PeLWVZkbD
6ljrbTMaxq1YmD9YGuTscNz9eVHdtbvRvrXcsottHR5Hufnub0ENHGgcOOMg79qu
m1Cw1HN+yXBoJk6dzJ71S21DZ21d9jAZDLuh6cucOwIDAQABo4IBGzCCARcwDgYD
VR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNV
HRMBAf8EAjAAMB0GA1UdDgQWBBQDOq+GIDxtxPv9k7f4c4ggIEFKTTAfBgNVHSME
GDAWgBRomD2put4sKJyqDe2pxz7ZmcdTLjCBlwYDVR0RBIGPMIGMghFwb2RwcmVz
ZXQtc2VydmljZYIdcG9kcHJlc2V0LXNlcnZpY2Uua3ViZS1zeXN0ZW2CJnBvZHBy
ZXNldC1zZXJ2aWNlLnBvZHByZXNldC1jcmQtc3lzdGVtgipwb2RwcmVzZXQtc2Vy
dmljZS5wb2RwcmVzZXQtY3JkLXN5c3RlbS5zdmOHBH8AAAEwDQYJKoZIhvcNAQEL
BQADggEBAMwPs5CdLSTU1AUL2kmtwJfMlujUngif8uZckfxUcHr9BJWy2mHZ9fY7
c57bVTKaC/t1fSnVm5ZPY3JzEgExGyqTxnL+tHmXieVO1NUHLXVA2aLILtTztPTN
PUH+gIgfGkZgJCT5iS7miJIZEmNss1NdD8et3Yy5+7xmw4nX80c3d/u5nVV9SCC4
QpGWb2J7cErDFuDVjOd0byE9SX44I8EFJBox8+ZHJIW9D5mTwFB+iG3QTKwUCP7x
hlsJqgbc4tG6PQ4k9GTNY3c34YOBsyDlwRSl5ijv8tWIgJU5s+gy69aWXvSzmfkW
/Oa+DnWx09+dhQTEE/heXta1/6ShiTc=
-----END CERTIFICATE-----
13 changes: 13 additions & 0 deletions webhook/rbac/rbac_role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: webhook-role
rules:
- apiGroups:
- settings.servicecatalog.k8s.io
resources:
- podpresets
verbs:
- get
- list
- watch
13 changes: 13 additions & 0 deletions webhook/rbac/rbac_role_binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
creationTimestamp: null
name: webhook-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: webhook-role
subjects:
- kind: ServiceAccount
name: default
namespace: podpreset-crd-system

0 comments on commit 2ee3963

Please sign in to comment.