-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: build/deploy csi-proxy in host-process container #179
Changes from all commits
46da171
9fb739d
8ccdb66
498fe4f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
#! /bin/bash | ||
|
||
. release-tools/prow.sh | ||
|
||
# Extract tag-n-hash value from GIT_TAG (form vYYYYMMDD-tag-n-hash) for REV value. | ||
REV=v$(echo "$GIT_TAG" | cut -f3- -d 'v') | ||
: ${CSI_PROW_BUILD_PLATFORMS:="windows amd64 .exe nanoserver:1809; windows amd64 .exe nanoserver:ltsc2022"} | ||
: ${REGISTRY_NAME:="gcr.io/k8s-staging-sig-storage"} | ||
|
||
# This creates the CSI_PROW_WORK directory that is needed by run_with_go. | ||
ensure_paths | ||
. release-tools/prow.sh | ||
|
||
run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make build REV="${REV}" | ||
gcr_cloud_build |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ | |
|
||
# # Only these tests make sense for csi-proxy | ||
: ${CSI_PROW_TESTS:="unit"} | ||
: ${CSI_PROW_BUILD_PLATFORMS:="windows amd64 .exe"} | ||
: ${CSI_PROW_BUILD_PLATFORMS:="windows amd64 .exe nanoserver:1809"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CSI_PROW_BUILD_PLATFORMS should already have a default, I think we should remove this line and use that default instead |
||
: ${REGISTRY_NAME:="gcr.io/k8s-staging-sig-storage"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be:
|
||
|
||
. release-tools/prow.sh | ||
|
||
|
@@ -14,3 +15,6 @@ ensure_paths | |
# main | ||
run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make all "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" "BUILD_PLATFORMS=${CSI_PROW_BUILD_PLATFORMS}" | ||
run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make -k test "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" 2>&1 | make_test_to_junit | ||
|
||
# build / push multi-arch images for validation | ||
gcr_cloud_build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for clarification, this file .prow.sh is what runs in the presubmit jobs and .cloudbuild.sh is the one that runs on postsubmit jobs |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ARG BASE_IMAGE=nanoserver:1809 | ||
ARG REGISTRY=mcr.microsoft.com/windows | ||
|
||
FROM ${REGISTRY}/${BASE_IMAGE} | ||
|
||
Add /bin/csi-proxy.exe /csi-proxy.exe | ||
|
||
ENV PATH="C:\Windows\system32;C:\Windows;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;" | ||
ENTRYPOINT ["csi-proxy.exe", "-v", "4"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: csi-proxy | ||
namespace: kube-system | ||
spec: | ||
selector: | ||
matchLabels: | ||
name: csi-proxy | ||
template: | ||
metadata: | ||
labels: | ||
name: csi-proxy | ||
spec: | ||
nodeSelector: | ||
"kubernetes.io/os": windows | ||
securityContext: | ||
windowsOptions: | ||
hostProcess: true | ||
runAsUserName: "NT AUTHORITY\\SYSTEM" | ||
hostNetwork: true | ||
containers: | ||
- name: csi-proxy | ||
image: mrosse3/csi-proxy:canary # for testing | ||
imagePullPolicy: Always # for testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marosset so sorry for the late response. I checked what other CSI projects do and none of them push the presubmit artifacts to a remote! They instead just build the linux image locally and run a kind cluster on the location where the prow job runs for the integration tests.
I recently added a multidistro build to kubernetes-sigs/local-volume-provisioner in https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner/pull/279/files, every prow job inherits the project through the env var
$PROJECT
which can be used for the presubmit image location.One thing that I saw that might cause problems is that the tag is always
canary
for master, I think it should have some info about the git tag to avoid stepping on the changes of another contributor but we can fix that later.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might make the presubmit job pass but I think I might be forgetting about the post submit image push to
gcr.io/k8s-staging-sig-storage
, I'll check that tooThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't be set in this file, this is the file that runs on postsubmit