Skip to content

Commit

Permalink
Editing helm chart and adding releaser in actions (#64)
Browse files Browse the repository at this point in the history
* Editing helm chart and adding releaser in actions

* Changing tag

* Logging changes

* Small change
  • Loading branch information
dlakhaws committed Nov 16, 2023
1 parent f037065 commit 97cac13
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 21 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,19 @@ jobs:
uses: aws-actions/amazon-ecr-login@v2
- name: Promote image
run: |
crane copy ${{ steps.login-ecr-test.outputs.registry }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_ID }} ${{ env.ARS_REGISTRY }}:${{ env.GIT_TAG }}
crane copy ${{ steps.login-ecr-test.outputs.registry }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_ID }} ${{ env.ARS_REGISTRY }}:${{ env.GIT_TAG }}
- name: Create Release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
Mountpoint for AWS S3 CSI Driver
## CHANGELOG
See [CHANGELOG](https://github.com/awslabs/mountpoint-s3-csi-driver/blob/main/CHANGELOG.md) for full list of changes
draft: true
prerelease: false
2 changes: 1 addition & 1 deletion charts/aws-mountpoint-s3-csi-driver/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: aws-mountpoint-s3-csi-driver
description: A Helm chart for installing the Mountpoint for Amazon S3 CSI Driver. This is a CSI driver that uses Mountpoint for S3 to mount S3 buckets as a file system.
version: 0.0.2
version: 1.0.0
kubeVersion: ">=1.23.0-0"
home: https://github.com/awslabs/mountpoint-s3-csi-driver
sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/aws-mountpoint-s3-csi-driver/templates/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
args:
- --endpoint=$(CSI_ENDPOINT)
- --logtostderr
- --v=5
- --v={{ .Values.node.logLevel }}
env:
- name: CSI_ENDPOINT
value: unix:/csi/csi.sock
Expand Down
11 changes: 3 additions & 8 deletions charts/aws-mountpoint-s3-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,20 @@
# Declare variables to be passed into your templates.

image:
# NOTE: Change this to personal ECR private repo until public one is created
repository: <enter-registry-here>
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
tag: "v1.0.0"

node:
resources: {}
kubeletPath: /var/lib/kubelet
logLevel: 5
logLevel: 4
containerSecurityContext:
privileged: true
serviceAccount:
# Specifies whether a service account should be created
create: false
create: true
name: s3-csi-driver-sa

sidecars:
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/base/node-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
args:
- --endpoint=$(CSI_ENDPOINT)
- --logtostderr
- --v=5
- --v=4
env:
- name: CSI_ENDPOINT
value: unix:/csi/csi.sock
Expand Down
4 changes: 2 additions & 2 deletions pkg/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (d *Driver) Run() error {
defer cancel()
tokenFile := os.Getenv(webIdentityTokenEnv)
if tokenFile != "" {
klog.Errorf("Found AWS_WEB_IDENTITY_TOKEN_FILE, syncing token")
klog.Infof("Found AWS_WEB_IDENTITY_TOKEN_FILE, syncing token")
go tokenFileTender(ctx, tokenFile, "/csi/token")
}

Expand Down Expand Up @@ -145,7 +145,7 @@ func tokenFileTender(ctx context.Context, sourcePath string, destPath string) {
timer := time.After(10 * time.Second)
err := ReplaceFile(destPath, sourcePath, 0600)
if err != nil {
klog.Errorf("Failed to sync AWS web token file: %v", err)
klog.Infof("Failed to sync AWS web token file: %v", err)
}
select {
case <-timer:
Expand Down
14 changes: 7 additions & 7 deletions pkg/driver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolu
mountpointArgs = append(mountpointArgs, "--read-only")
}

klog.V(5).Infof("NodePublishVolume: creating dir %s", target)
klog.V(4).Infof("NodePublishVolume: creating dir %s", target)
if err := d.Mounter.MakeDir(target); err != nil {
return nil, status.Errorf(codes.Internal, "Could not create dir %q: %v", target, err)
}
Expand All @@ -105,12 +105,12 @@ func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolu
return nil, status.Errorf(codes.Internal, "Could not check if %q is mounted: %v", target, err)
}
if !mounted {
klog.V(5).Infof("NodePublishVolume: mounting %s at %s with options %v", bucket, target, mountpointArgs)
klog.V(4).Infof("NodePublishVolume: mounting %s at %s with options %v", bucket, target, mountpointArgs)
if err := d.Mounter.Mount(bucket, target, fstype, mountpointArgs); err != nil {
os.Remove(target)
return nil, status.Errorf(codes.Internal, "Could not mount %q at %q: %v", bucket, target, err)
}
klog.V(5).Infof("NodePublishVolume: %s was mounted", target)
klog.V(4).Infof("NodePublishVolume: %s was mounted", target)
}

return &csi.NodePublishVolumeResponse{}, nil
Expand Down Expand Up @@ -154,20 +154,20 @@ func (d *Driver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublish

mounted, err := d.Mounter.IsMountPoint(target)
if err != nil && os.IsNotExist(err) {
klog.V(5).Infof("NodeUnpublishVolume: target path %s does not exist, skipping unmount", target)
klog.V(4).Infof("NodeUnpublishVolume: target path %s does not exist, skipping unmount", target)
return &csi.NodeUnpublishVolumeResponse{}, nil
} else if err != nil && d.Mounter.IsCorruptedMnt(err) {
klog.V(5).Infof("NodeUnpublishVolume: target path %s is corrupted: %v, will try to unmount", target, err)
klog.V(4).Infof("NodeUnpublishVolume: target path %s is corrupted: %v, will try to unmount", target, err)
mounted = true
} else if err != nil {
return nil, status.Errorf(codes.Internal, "Could not unmount %q: %v", target, err)
}
if !mounted {
klog.V(5).Infof("NodeUnpublishVolume: target path %s not mounted, skipping unmount", target)
klog.V(4).Infof("NodeUnpublishVolume: target path %s not mounted, skipping unmount", target)
return &csi.NodeUnpublishVolumeResponse{}, nil
}

klog.V(5).Infof("NodeUnpublishVolume: unmounting %s", target)
klog.V(4).Infof("NodeUnpublishVolume: unmounting %s", target)
err = d.Mounter.Unmount(target)
if err != nil {
return nil, status.Errorf(codes.Internal, "Could not unmount %q: %v", target, err)
Expand Down

0 comments on commit 97cac13

Please sign in to comment.