-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(add): Add multiarch image support for chaos-exporter (#76)
Signed-off-by: Udit Gaurav <[email protected]>
- Loading branch information
1 parent
44fa613
commit e11c93a
Showing
11 changed files
with
101 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
package=$1 | ||
if [[ -z "$package" ]]; then | ||
echo "usage: $0 <package-name>" | ||
exit 1 | ||
fi | ||
package_split=(${package//\// }) | ||
package_name=${package_split[-1]} | ||
|
||
# add the arch for which we want to build the image | ||
platforms=("linux/amd64" "linux/arm64") | ||
for platform in "${platforms[@]}" | ||
do | ||
platform_split=(${platform//\// }) | ||
GOOS=${platform_split[0]} | ||
GOARCH=${platform_split[1]} | ||
output_name=exporter-$GOARCH | ||
|
||
# The script executes for the argument passed (in package variable) | ||
# here the arg will be "./cmd/exporter" for creating binary | ||
env GOOS=$GOOS GOARCH=$GOARCH go build -o $output_name $package | ||
if [ $? -ne 0 ]; then | ||
echo 'An error has occurred! Aborting the script execution...' | ||
exit 1 | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: pod-delete-sa | ||
namespace: litmus | ||
labels: | ||
name: pod-delete-sa | ||
app.kubernetes.io/part-of: litmus | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: pod-delete-sa | ||
namespace: litmus | ||
labels: | ||
name: pod-delete-sa | ||
app.kubernetes.io/part-of: litmus | ||
rules: | ||
- apiGroups: ["","litmuschaos.io","batch","apps"] | ||
resources: ["pods","deployments","pods/log","events","jobs","chaosengines","chaosexperiments","chaosresults"] | ||
verbs: ["create","list","get","patch","update","delete","deletecollection"] | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: pod-delete-sa | ||
namespace: litmus | ||
labels: | ||
name: pod-delete-sa | ||
app.kubernetes.io/part-of: litmus | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: pod-delete-sa | ||
subjects: | ||
- kind: ServiceAccount | ||
name: pod-delete-sa | ||
namespace: litmus |