Skip to content

Commit 0023351

Browse files
authored
chore(sidecar): adding sidecar to the helper pod (#441)
* chore(sidecar): add sidecar image and imagepullpolicy in engine Signed-off-by: Shubham Chaudhary <[email protected]>
1 parent f3873a0 commit 0023351

4 files changed

Lines changed: 82 additions & 1 deletion

File tree

api/litmuschaos/v1alpha1/chaosengine_types.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,19 @@ type Pod struct {
148148

149149
// ComponentParams defines information about the runner
150150
type ComponentParams struct {
151-
//Contains informations of the the runner pod
151+
//Contains information of the runner pod
152152
Runner RunnerInfo `json:"runner"`
153+
// Contains information of the sidecar
154+
Sidecar []Sidecar `json:"sidecar,omitempty"`
155+
}
156+
157+
type Sidecar struct {
158+
//Image of the runner pod
159+
Image string `json:"image"`
160+
//ImagePullPolicy for runner pod
161+
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
162+
// Secrets for runner pod
163+
Secrets []Secret `json:"secrets,omitempty"`
153164
}
154165

155166
// RunnerInfo defines the information of the runnerinfo pod

api/litmuschaos/v1alpha1/zz_generated.deepcopy.go

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy/chaos_crds.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,28 @@ spec:
103103
components:
104104
type: object
105105
properties:
106+
sidecar:
107+
type: array
108+
items:
109+
type: object
110+
x-kubernetes-preserve-unknown-fields: true
111+
properties:
112+
image:
113+
type: string
114+
imagePullPolicy:
115+
type: string
116+
secrets:
117+
items:
118+
properties:
119+
mountPath:
120+
type: string
121+
name:
122+
type: string
123+
required:
124+
- mountPath
125+
- name
126+
type: object
127+
type: array
106128
runner:
107129
x-kubernetes-preserve-unknown-fields: true
108130
type: object

deploy/crds/chaosengine_crd.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,27 @@ spec:
102102
components:
103103
type: object
104104
properties:
105+
sidecar:
106+
type: array
107+
items:
108+
type: object
109+
properties:
110+
image:
111+
type: string
112+
imagePullPolicy:
113+
type: string
114+
secrets:
115+
items:
116+
properties:
117+
mountPath:
118+
type: string
119+
name:
120+
type: string
121+
required:
122+
- mountPath
123+
- name
124+
type: object
125+
type: array
105126
runner:
106127
x-kubernetes-preserve-unknown-fields: true
107128
type: object

0 commit comments

Comments
 (0)