Skip to content

Commit

Permalink
change cache mode default hostpath
Browse files Browse the repository at this point in the history
  • Loading branch information
barnettZQG committed Feb 28, 2021
1 parent 4e9ee1e commit 39cab90
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/commit-ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: commit-ci-build

on:
push:
branches: [master, V5.3]
branches: [master]

jobs:
build:
Expand Down Expand Up @@ -31,6 +31,6 @@ jobs:
uses: docker/build-push-action@v2
with:
push: true
tags: registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond-operator:v2.0.0
tags: registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond-operator:v2.0.0-dev
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
3 changes: 2 additions & 1 deletion .github/workflows/release-ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: release-ci-build

on:
release:
branches: [master, V5.3]
branches: [master]
workflow_dispatch:

jobs:
build:
Expand Down
14 changes: 12 additions & 2 deletions controllers/handler/chaos.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ func (c *chaos) deployment() client.Object {
{
Name: "cache",
VolumeSource: corev1.VolumeSource{
PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
ClaimName: constants.CachePVC,
HostPath: &corev1.HostPathVolumeSource{
Path: "/cache",
Type: k8sutil.HostPath(corev1.HostPathDirectoryOrCreate),
},
},
},
Expand All @@ -164,6 +165,7 @@ func (c *chaos) deployment() client.Object {
"--pvc-cache-name=" + constants.CachePVC,
"--rbd-namespace=" + c.component.Namespace,
"--rbd-repo=" + ResourceProxyName,
"--cache-mode=hostpath",
}

if c.etcdSecret != nil {
Expand Down Expand Up @@ -191,6 +193,14 @@ func (c *chaos) deployment() client.Object {
},
},
},
{
Name: "HOST_IP",
ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "spec.nodeName",
},
},
},
{
Name: "SOURCE_DIR",
Value: "/cache/source",
Expand Down

0 comments on commit 39cab90

Please sign in to comment.