-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from IBM/webhook-mount
Introduce functions to prevent containers from mounting to host socket file and to modify the image name of the sidecar
- Loading branch information
Showing
56 changed files
with
1,702 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
dep ensure | ||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ti-webhook . | ||
if [ $? -ne 0 ]; then exit 1 ; fi | ||
docker build --no-cache -t trustedseriviceidentity/ti-webhook:v1.2 . | ||
docker build --no-cache -t trustedseriviceidentity/ti-webhook:v1.3 . | ||
|
||
docker push trustedseriviceidentity/ti-webhook:v1.2 | ||
docker push trustedseriviceidentity/ti-webhook:v1.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
dependencies: | ||
- name: ti-key-release-1 | ||
version: 1.2.0 | ||
version: 1.3.0 | ||
repository: "file://../ti-key-release-1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: myubuntu | ||
name: myubuntu | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: myubuntu | ||
template: | ||
metadata: | ||
annotations: | ||
admission.trusted.identity/inject: "false" | ||
tsi.secrets: | | ||
- tsi.secret/name: "mysecret1" | ||
tsi.secret/role: "demo" | ||
tsi.secret/vault-path: "secret/ti-demo-all" | ||
tsi.secret/local-name: "mysecrets/myubuntu-mysecret1" | ||
labels: | ||
app: myubuntu | ||
name: myubuntu | ||
spec: | ||
containers: | ||
- name: myubuntu | ||
image: ubuntu@sha256:250cc6f3f3ffc5cdaa9d8f4946ac79821aafb4d3afc93928f0de9336eba21aa4 | ||
imagePullPolicy: Always | ||
command: [ "/bin/bash", "-c", "--" ] | ||
args: [ "while true; do cat /mydata; sleep 5; done;" ] | ||
volumeMounts: | ||
- mountPath: /host/etc | ||
name: host-etc | ||
- mountPath: /host/sockets | ||
name: tsi-sockets | ||
- mountPath: /host/secrets | ||
name: tsi-secrets | ||
volumes: | ||
- emptyDir: {} | ||
name: tsi-secrets | ||
- hostPath: | ||
path: /tsi-secure/sockets | ||
type: Directory | ||
name: tsi-sockets | ||
- hostPath: | ||
path: /etc | ||
type: Directory | ||
name: host-etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
[ | ||
{ | ||
"op": "add", | ||
"path": "/spec/containers/-", | ||
"value": { | ||
"name": "jwt-sidecar", | ||
"image": "trustedseriviceidentity/ti-jwt-sidecar:v1.3", | ||
"env": [ | ||
{ | ||
"name": "HOST_IP", | ||
"valueFrom": { | ||
"fieldRef": { | ||
"fieldPath": "status.hostIP" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "JWT_TTL_SEC", | ||
"value": "30" | ||
}, | ||
{ | ||
"name": "VAULT_ADDR", | ||
"value": "http://ti-test1.eu-de.containers.appdomain.cloud" | ||
}, | ||
{ | ||
"name": "SECRET_REFRESH_SEC", | ||
"value": "45" | ||
} | ||
], | ||
"resources": {}, | ||
"volumeMounts": [ | ||
{ | ||
"name": "tsi-secrets", | ||
"mountPath": "/usr/share/secrets" | ||
}, | ||
{ | ||
"name": "tsi-sockets", | ||
"mountPath": "/host/sockets" | ||
}, | ||
{ | ||
"name": "pod-metadata", | ||
"readOnly": true, | ||
"mountPath": "/pod-metadata" | ||
}, | ||
{ | ||
"name": "host-etc", | ||
"readOnly": true, | ||
"mountPath": "/host/etc" | ||
} | ||
], | ||
"imagePullPolicy": "Always", | ||
"securityContext": { | ||
"runAsUser": 0 | ||
} | ||
} | ||
} | ||
] |
Oops, something went wrong.