Skip to content

Commit

Permalink
Merge pull request redhat-developer#50 from JPinkney/codeSnippits
Browse files Browse the repository at this point in the history
Code snippits
  • Loading branch information
JPinkney authored Jun 21, 2017
2 parents 7cd01d0 + 74c1d43 commit 21abf6d
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
84 changes: 84 additions & 0 deletions client/.vscode/snippets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"Deployment": {
"prefix": "Deployment",
"body": [
"kind: Deployment",
"metadata:",
" name: ${TM_FILENAME}",
" labels:",
" app: ${TM_FILENAME}",
" version: 1.0.0",
"spec:",
" replicas: 1",
" template:",
" spec:",
" containers:",
" - name: main"
],
"description": "Generate deployment"
},
"Deployment Config": {
"prefix": "Deployment Config",
"body": [
"kind: DeploymentConfig",
"apiVersion: v1",
"metadata:",
" name: ${TM_FILENAME}",
"spec:",
" template:",
" metadata:",
" labels:",
" name: ${TM_FILENAME}",
" spec:",
" containers:",
" - name: hello world",
" image: example",
" ports:",
" - containerPort: 8080",
" protocol: TCP"
],
"description": "Generate deployment config"
},
"Route": {
"prefix": "Route",
"body": [
"apiVersion: v1",
"kind: Route",
"metadata:",
" name: ${TM_FILENAME}",
"spec:",
" host:",
" to:",
" kind: Service",
" name:"
],
"description": "Generate route"
},
"Config Map": {
"prefix": "Config Map",
"body": [
"kind: ConfigMap",
"metadata:",
" name: ${TM_FILENAME}",
" namespace: default",
"data:"
],
"description": "Generate config map"
},
"Persistent Volume Claim": {
"prefix": "Persistent Volume Claim",
"body": [
"kind: PersistentVolumeClaim",
"metadata:",
" name: claim",
"spec:",
" accessModes:",
" - \"ReadWriteOnce\"",
" resources:",
" requests:",
" storage: 1Gi",
" volumeName: pv0001"
],
"description": "Generate Persistent Volume Claim"
}
}
6 changes: 6 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
],
"main": "./out/src/extension",
"contributes": {
"snippets": [
{
"language": "yaml",
"path": "./.vscode/snippets.json"
}
],
"commands": [
{
"command": "extension.k8s.enableValidation",
Expand Down

0 comments on commit 21abf6d

Please sign in to comment.