Skip to content

Instantly share code, notes, and snippets.

@varshavaradarajan
Created April 2, 2018 05:42
Show Gist options
  • Save varshavaradarajan/ff5435220a051aa49b61bbd5507a2e0f to your computer and use it in GitHub Desktop.
Save varshavaradarajan/ff5435220a051aa49b61bbd5507a2e0f to your computer and use it in GitHub Desktop.
curl 'http://localhost:8153/go/api/elastic/profiles' \
-H 'Accept: application/vnd.go.cd.v1+json' \
-H 'Content-Type: application/json' \
-X POST -d '{
"id": "demo-app",
"plugin_id": "cd.go.contrib.elasticagent.kubernetes",
"properties": [
{
"key": "Image",
"value": "gocd/gocd-agent-docker-dind:v18.2.0"
},
{
"key": "PodConfiguration",
"value": "apiVersion: v1\nkind: Pod\nmetadata:\n name: pod-name-prefix-{{ POD_POSTFIX }}\n labels:\n app: web\nspec:\n containers:\n - name: gocd-agent-container-{{ CONTAINER_POSTFIX }}\n image: {{ GOCD_AGENT_IMAGE }}:{{ LATEST_VERSION }}\n securityContext:\n privileged: true"
},
{
"key": "SpecifiedUsingPodConfiguration",
"value": "false"
},
{
"key": "Privileged",
"value": "true"
}
]
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment