๐
This file contains hidden or 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: restart-helper | |
labels: | |
app: restart-helper | |
spec: | |
replicas: 1 | |
template: | |
metadata: |
This file contains hidden or 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
curl "https://myhost.mydomain.com/restart/deployment/my-deployment-name" |
This file contains hidden or 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: restart-helper | |
spec: | |
selector: | |
app: restart-helper | |
ports: | |
- port: 7055 | |
name: http |
This file contains hidden or 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
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: restart-helper | |
--- | |
# Allows the service account to: | |
# | |
# - Get namespaces. | |
# - Get/patch our deployments and statefulsets, to allow the | |
# "restart rollout" command to work. |
This file contains hidden or 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
curl "https://myhost.mydomain.com/restart/deployment/my-deployment-name" |
This file contains hidden or 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
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: restart-helper | |
spec: | |
rules: | |
- host: myhost.mydomain.com | |
http: | |
paths: | |
- path: / |
This file contains hidden or 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
port: 7055 | |
listeners: | |
"/hello/:name": | |
returnOutput: true | |
command: bash | |
args: | |
- -c | |
- | | |
echo "Hello {{ .name | upper }}" |
This file contains hidden or 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
"/http/:param1/:param2": | |
returnOutput: true | |
command: bash | |
args: | |
- -c | |
- | | |
echo "Params: {{ .param1 }}, {{ .param2 }}" | |
echo "Query: {{ .query1 }}" | |
echo "Body: {{ .field1 }}" |
This file contains hidden or 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
curl http://localhost:7055/http/abc/def?query1=yay \ | |
-d '{"field1":"Long body, but JSON!"}' \ | |
-H 'Content-Type: application/json' | jq -r .output | |
Params: abc, def | |
Query: yay | |
Body: Long body, but JSON! |
This file contains hidden or 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
curl http://localhost:7055/http/abc/def?query1=yay \ | |
-d field1="Long body!" | jq -r .output | |
Params: abc, def | |
Query: yay | |
Body: Long body! |