Skip to content

Commit

Permalink
Correct the contianer name in BluePrint and Cassandra app (#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
viveksinghggits authored Mar 16, 2020
1 parent fe3641c commit 0c500ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions examples/stable/cassandra/cassandra-blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ actions:
args:
namespace: "{{ .StatefulSet.Namespace }}"
pods: "{{ range .StatefulSet.Pods }} {{.}}{{end}}"
containers: cassandra
containers: "{{ .StatefulSet.Name }}"
command:
- bash
- -o
Expand All @@ -40,7 +40,7 @@ actions:
args:
namespace: "{{ .StatefulSet.Namespace }}"
pods: "{{ range .StatefulSet.Pods }} {{.}}{{end}}"
containers: "cassandra"
containers: "{{ .StatefulSet.Name }}"
command:
- bash
- -o
Expand Down Expand Up @@ -69,15 +69,15 @@ actions:
args:
namespace: "{{ .StatefulSet.Namespace }}"
pods: "{{ range .StatefulSet.Pods }} {{.}}{{end}}"
container: cassandra
container: "{{ .StatefulSet.Name }}"
includePath: "{{ .Phases.getBackupPrefixLocation.Output.localSnapshotPrefixLocation }}"
backupArtifactPrefix: "{{ .Phases.getBackupPrefixLocation.Output.backupPrefixLocation }}"
- func: KubeExec
name: deleteLocalBackup
args:
namespace: "{{ .StatefulSet.Namespace }}"
pod: "{{ index .StatefulSet.Pods 0}}"
containers: "cassandra"
containers: "{{ .StatefulSet.Name }}"
command:
- bash
- -o
Expand Down Expand Up @@ -122,7 +122,7 @@ actions:
args:
namespace: "{{ .StatefulSet.Namespace }}"
pod: "{{ index .StatefulSet.Pods 0 }}"
containers: "cassandra"
containers: "{{ .StatefulSet.Name }}"
command:
- bash
- -o
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/cassandra.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (cas *CassandraInstance) Reset(ctx context.Context) error {
}

func (cas *CassandraInstance) execCommand(ctx context.Context, command []string) (string, string, error) {
podname, containername, err := kube.GetPodContainerFromStatefulSet(ctx, cas.cli, cas.namespace, "cassandra")
podname, containername, err := kube.GetPodContainerFromStatefulSet(ctx, cas.cli, cas.namespace, cas.chart.Release)
if err != nil || podname == "" {
return "", "", errors.Wrapf(err, "Error getting the pod and container name %s.", cas.name)
}
Expand Down

0 comments on commit 0c500ac

Please sign in to comment.