Skip to content

Commit

Permalink
UPSTREAM: <carry>: Add OpenShift files
Browse files Browse the repository at this point in the history
Additional changes:

- remove .github files
- do not overwrite GOARCH in makefile
- go mod tidy && go mod vendor
  • Loading branch information
RomanBednar authored and dfajmon committed Sep 5, 2024
1 parent dcc681c commit 566aff3
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 263 deletions.
4 changes: 4 additions & 0 deletions .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build_root_image:
name: release
namespace: openshift
tag: rhel-9-release-golang-1.22-openshift-4.17
24 changes: 0 additions & 24 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/enhancement-request.md

This file was deleted.

18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/support-request.md

This file was deleted.

5 changes: 0 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

67 changes: 0 additions & 67 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/container-image.yaml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/cr.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/helm-chart-release.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/release.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# References:
# https://docs.snyk.io/scan-applications/snyk-code/using-snyk-code-from-the-cli/excluding-directories-and-files-from-the-snyk-code-cli-test
# https://docs.snyk.io/snyk-cli/commands/ignore
exclude:
global:
- vendor/**
- troubleshooting/log_collector.py
18 changes: 18 additions & 0 deletions Dockerfile.openshift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder
WORKDIR /go/src/github.com/kubernetes-sigs/aws-efs-csi-driver
COPY . .
RUN make bin/aws-efs-csi-driver

# Use a base image with aws-efs-utils installed
FROM registry.ci.openshift.org/ocp/4.17:aws-efs-utils-base

# From the upstream Dockerfile:
# At image build time, static files installed by efs-utils in the config directory, i.e. CAs file, need
# to be saved in another place so that the other stateful files created at runtime, i.e. private key for
# client certificate, in the same config directory can be persisted to host with a host path volume.
# Otherwise creating a host path volume for that directory will clean up everything inside at the first time.
# Those static files need to be copied back to the config directory when the driver starts up.
RUN mv /etc/amazon/efs /etc/amazon/efs-static-files

COPY --from=builder /go/src/github.com/kubernetes-sigs/aws-efs-csi-driver/bin/aws-efs-csi-driver /usr/bin/
ENTRYPOINT ["/usr/bin/aws-efs-csi-driver"]
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ word-hyphen = $(word $2,$(subst -, ,$1))
.PHONY: linux/$(ARCH) bin/aws-efs-csi-driver
linux/$(ARCH): bin/aws-efs-csi-driver
bin/aws-efs-csi-driver: | bin
CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) go build -mod=vendor -ldflags ${LDFLAGS} -o bin/aws-efs-csi-driver ./cmd/
# OpenShift: <carry>: do not overwrite GOARCH, use the one provided by the builder.
@echo GOARCH:${GOARCH}
CGO_ENABLED=0 GOOS=linux go build -mod=vendor -ldflags ${LDFLAGS} -o bin/aws-efs-csi-driver ./cmd/

.PHONY: all
all: all-image-docker
Expand Down
15 changes: 3 additions & 12 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
# See the OWNERS docs at https://go.k8s.io/owners

approvers:
- d-nishi
- leakingtapan
- justinsb
- jsafrane
- wongma7
- nckturner
- jqmichael
- Ashley-wenyizha
- mskanth972
- seanzatzdev-amazon
- openshift-storage-maintainers
component: "Storage"

9 changes: 9 additions & 0 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
aliases:
openshift-storage-maintainers:
- jsafrane
- tsmetana
- gnufied
- bertinatto
- dobsonj
- RomanBednar
- mpatlasov

0 comments on commit 566aff3

Please sign in to comment.