-
Notifications
You must be signed in to change notification settings - Fork 12
/
devfile.yaml
114 lines (114 loc) · 3.06 KB
/
devfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
apiVersion: 1.0.0
metadata:
name: terraform-provider-k8s
projects:
- name: terraform-provider-k8s
source:
location: 'https://github.com/mingfang/terraform-provider-k8s.git'
type: git
clonePath: src/github.com/mingfang/terraform-provider-k8s/
- name: terraform-k8s-modules
source:
location: 'https://github.com/mingfang/terraform-k8s-modules.git'
type: git
components:
- alias: terraform
type: kubernetes
referenceContent: |
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: Pod
metadata:
name: terraform
spec:
containers:
- name: terraform
image: registry.rebelsoft.com/terraform-provider-k8s
command: [sleep, infinity]
env:
- name: HOME
value: /projects
- name: TF_VAR_namespace
value: ""
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
resources:
limits:
memory: 2048Mi
volumeMounts:
- mountPath: /projects
name: projects
volumes:
- name: projects
persistentVolumeClaim:
claimName: projects
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: projects
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
- alias: go-cli
type: dockerimage
image: 'quay.io/eclipse/che-golang-1.12:7.6.0'
env:
- value: '/go:$(CHE_PROJECTS_ROOT)'
name: GOPATH
- value: /tmp/.cache
name: GOCACHE
- value: 'on'
name: GO111MODULE
mountSources: true
memoryLimit: 2048Mi
- id: redhat/vscode-yaml/latest
type: chePlugin
- id: ms-vscode/go/latest
alias: go-plugin
type: chePlugin
commands:
- name: build
actions:
- workdir: '${CHE_PROJECTS_ROOT}/src/github.com/mingfang/terraform-provider-k8s/'
type: exec
command: >-
go build -o
${CHE_PROJECTS_ROOT}/.terraform.d/plugins/terraform-provider-k8s_v1.0.0
component: go-cli
- name: terraform fmt
actions:
- workdir: '${fileDirname}'
type: exec
command: pwd; terraform fmt
component: terraform
- name: terraform init
actions:
- workdir: '${fileDirname}'
type: exec
command: pwd; terraform init
component: terraform
- name: terraform plan
actions:
- workdir: '${fileDirname}'
type: exec
command: pwd; terraform plan
component: terraform
- name: terraform apply -auto-approve
actions:
- workdir: '${fileDirname}'
type: exec
command: pwd; terraform apply -auto-approve
component: terraform
- name: terraform destroy -auto-approve
actions:
- workdir: '${fileDirname}'
type: exec
command: pwd; terraform destroy -auto-approve
component: terraform