Skip to content

Commit 2e4276e

Browse files
authored
Merge pull request #8 from PatrickGhadban/main
Add container image workflow to publish images to ECR public repo
2 parents bd9ffc8 + 53102c9 commit 2e4276e

File tree

15 files changed

+159
-22
lines changed

15 files changed

+159
-22
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve File Cache CSI Driver
4+
labels:
5+
6+
---
7+
8+
/kind bug
9+
10+
**What happened?**
11+
12+
**What you expected to happen?**
13+
14+
**How to reproduce it (as minimally and precisely as possible)?**
15+
16+
**Anything else we need to know?**:
17+
18+
**Environment**
19+
- Kubernetes version (use `kubectl version`):
20+
- Driver version:
21+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Enhancement request
2+
about: Suggest an idea for this project
3+
labels:
4+
5+
---
6+
7+
**Is your feature request related to a problem?/Why is this needed**
8+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9+
10+
/feature
11+
12+
**Describe the solution you'd like in detail**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.
20+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
labels:
5+
6+
---
7+
8+
**Is your feature request related to a problem? Please describe.**
9+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
10+
11+
**Describe the solution you'd like in detail**
12+
A clear and concise description of what you want to happen.
13+
14+
**Describe alternatives you've considered**
15+
A clear and concise description of any alternative solutions or features you've considered.
16+
17+
**Additional context**
18+
Add any other context or screenshots about the feature request here.
19+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Support request
3+
about: Ask questions about the driver
4+
labels:
5+
6+
---
7+
8+
<!--
9+
STOP -- PLEASE READ!
10+
11+
GitHub is not the right place for support requests.
12+
13+
If you're looking for help, post your question on the [Kubernetes Slack ](http://slack.k8s.io/) provider-aws Channel.
14+
15+
If the matter is security related, please disclose it privately via https://kubernetes.io/security/.
16+
-->
17+
18+
<!-- DO NOT EDIT BELOW THIS LINE -->
19+
20+
/triage support
21+

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
**Is this a bug fix or adding new feature?**
2+
3+
**What is this PR about? / Why do we need it?**
4+
5+
**What testing is done?**
6+

.github/cr.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
release-name-template: "helm-chart-{{ .Name }}-{{ .Version }}"
2+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Container Images
2+
3+
on: push
4+
env:
5+
REGION : "us-east-1"
6+
jobs:
7+
build:
8+
# this is to prevent the job to run at forked projects
9+
if: github.repository == 'kubernetes-sigs/aws-file-cache-csi-driver'
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
- name: Set up Docker Buildx
17+
id: buildx
18+
uses: docker/setup-buildx-action@v1
19+
- name: Set up QEMU
20+
uses: docker/setup-qemu-action@v1
21+
- name: Configure AWS Credentials
22+
uses: aws-actions/configure-aws-credentials@master
23+
with:
24+
role-to-assume: arn:aws:iam::664215443545:role/FileCacheCSIDriverImagePublisherRole
25+
aws-region: ${{ env.REGION }}
26+
- name: Login to Amazon ECR Public
27+
id: login-ecr-public
28+
uses: aws-actions/amazon-ecr-login@v1
29+
with:
30+
registry-type: public
31+
- name: Build, tag, and push docker image to Amazon ECR Public Repository
32+
env:
33+
REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
34+
REGISTRY_ALIAS: fsx-csi-driver
35+
REPOSITORY: aws-file-cache-csi-driver
36+
run: |
37+
BRANCH_OR_TAG=$(echo $GITHUB_REF | cut -d'/' -f3)
38+
if [ "$BRANCH_OR_TAG" = "master" ]; then
39+
GIT_TAG=$GITHUB_SHA
40+
else
41+
GIT_TAG=$BRANCH_OR_TAG
42+
fi
43+
export REGISTRY=$REGISTRY/$REGISTRY_ALIAS
44+
export TAG=$GIT_TAG
45+
make all-push

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ GOPATH=$(shell go env GOPATH)
2626
GOOS=$(shell go env GOOS)
2727
GOBIN=$(shell pwd)/bin
2828

29-
IMAGE?=648284600874.dkr.ecr.us-east-1.amazonaws.com/file-cache-dynamic-provisioning
29+
REGISTRY?=public.ecr.aws
30+
IMAGE?=$(REGISTRY)/aws-file-cache-csi-driver
3031
TAG?=$(GIT_COMMIT)
3132

3233
OUTPUT_TYPE?=docker

charts/aws-file-cache-csi-driver/values.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
# This is a YAML-formatted file.
33
# Declare variables to be passed into your templates.
44

5-
# TODO: Change image
65
image:
7-
repository: 651262257939.dkr.ecr.us-east-1.amazonaws.com/file-cache-dynamic-provisioning
8-
tag: v0.0.26
6+
repository: public.ecr.aws/fsx-csi-driver/aws-file-cache-csi-driver
7+
tag: v0.1.0
98
pullPolicy: IfNotPresent
109

1110
csidriver:
@@ -39,7 +38,7 @@ controller:
3938
# Specifies whether a service account should be created
4039
create: true
4140
## Enable if EKS IAM for SA is used
42-
# eks.amazonaws.com/role-arn: arn:aws:iam::111122223333:role/fsx-csi-role
41+
# eks.amazonaws.com/role-arn: arn:aws:iam::111122223333:role/file-cache-csi-role
4342
name: file-cache-csi-controller-sa
4443
annotations: {}
4544
tolerations: []
@@ -60,7 +59,7 @@ node:
6059
# Specifies whether a service account should be created
6160
create: true
6261
## Enable if EKS IAM for SA is used
63-
# eks.amazonaws.com/role-arn: arn:aws:iam::111122223333:role/fsx-csi-role
62+
# eks.amazonaws.com/role-arn: arn:aws:iam::111122223333:role/file-cache-csi-role
6463
name: file-cache-csi-node-sa
6564
annotations: {}
6665
tolerateAllTaints: false

deploy/kubernetes/base/controller-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
tolerationSeconds: 300
3131
containers:
3232
- name: file-cache-plugin
33-
image: 651262257939.dkr.ecr.us-east-1.amazonaws.com/file-cache-dynamic-provisioning:v0.0.26
33+
image: public.ecr.aws/fsx-csi-driver/aws-file-cache-csi-driver:v0.1.0
3434
imagePullPolicy: IfNotPresent
3535
args:
3636
- --endpoint=$(CSI_ENDPOINT)

0 commit comments

Comments
 (0)