-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Vicente Cheng <[email protected]>
- Loading branch information
1 parent
4ec22f9
commit 901728c
Showing
9 changed files
with
185 additions
and
20 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
45 changes: 45 additions & 0 deletions
45
deploy/charts/harvester-node-disk-manager/templates/webhook.yaml
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,45 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "harvester-node-disk-manager-webhook.labels" . | nindent 4 }} | ||
name: harvester-node-disk-manager-webhook | ||
spec: | ||
replicas: {{ .Values.webhook.replicas }} | ||
selector: | ||
matchLabels: | ||
{{- include "harvester-node-disk-manager-webhook.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "harvester-node-disk-manager-webhook.labels" . | nindent 8 }} | ||
spec: | ||
serviceAccountName: harvester-node-disk-manager-webhook | ||
containers: | ||
- name: harvester-node-disk-manager-webhook | ||
image: "{{ .Values.webhook.image.repository }}:{{ .Values.webhook.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.webhook.image.pullPolicy }} | ||
env: | ||
- name: NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
command: | ||
- node-disk-manager-webhook | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: harvester-node-disk-manager-webhook | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
{{- include "harvester-node-disk-manager-webhook.selectorLabels" . | nindent 4 }} | ||
ports: | ||
- name: https | ||
port: 443 | ||
protocol: TCP | ||
targetPort: {{ .Values.webhook.httpsPort }} |
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,22 @@ | ||
# syntax=docker/dockerfile:1.7.0 | ||
|
||
FROM registry.suse.com/bci/bci-base:15.6 | ||
|
||
# util-linux-systemd -> for `lsblk` command | ||
# e2fsprogs -> for `mkfs.ext4` command | ||
# iproute2 -> for `ip` command | ||
#RUN zypper -n rm container-suseconnect && \ | ||
# zypper -n install util-linux-systemd e2fsprogs iproute2 && \ | ||
# zypper -n clean -a && rm -rf /tmp/* /var/tmp/* /usr/share/doc/packages/* | ||
|
||
ARG TARGETPLATFORM | ||
|
||
RUN if [ "$TARGETPLATFORM" != "linux/amd64" ] && [ "$TARGETPLATFORM" != "linux/arm64" ]; then \ | ||
echo "Error: Unsupported TARGETPLATFORM: $TARGETPLATFORM" && \ | ||
exit 1; \ | ||
fi | ||
|
||
ENV ARCH=${TARGETPLATFORM#linux/} | ||
|
||
COPY bin/node-disk-manager-webhook-${ARCH} /usr/bin/node-disk-manager-webhook | ||
CMD ["node-disk-manager-webhook"] |
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 |
---|---|---|
@@ -1,22 +1,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
source $(dirname $0)/version | ||
|
||
cd $(dirname $0)/.. | ||
|
||
IMAGE=${REPO}/node-disk-manager:${TAG} | ||
if [[ -n ${BUILD_FOR_CI} ]]; then | ||
IMAGE=ttl.sh/node-disk-manager-${TAG}:1h | ||
fi | ||
DOCKERFILE=package/Dockerfile | ||
if [ -e ${DOCKERFILE}.${ARCH} ]; then | ||
DOCKERFILE=${DOCKERFILE}.${ARCH} | ||
fi | ||
|
||
buildx build --load -f ${DOCKERFILE} -t ${IMAGE} . | ||
echo Built ${IMAGE} | ||
if [[ -n ${BUILD_FOR_CI} ]]; then | ||
docker push ${IMAGE} | ||
echo ${IMAGE} pushed | ||
fi | ||
./package_controller | ||
./package_webhook |
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,22 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
source $(dirname $0)/version | ||
|
||
cd $(dirname $0)/.. | ||
|
||
IMAGE=${REPO}/node-disk-manager:${TAG} | ||
if [[ -n ${BUILD_FOR_CI} ]]; then | ||
IMAGE=ttl.sh/node-disk-manager-${TAG}:1h | ||
fi | ||
DOCKERFILE=package/Dockerfile | ||
if [ -e ${DOCKERFILE}.${ARCH} ]; then | ||
DOCKERFILE=${DOCKERFILE}.${ARCH} | ||
fi | ||
|
||
buildx build --load -f ${DOCKERFILE} -t ${IMAGE} . | ||
echo Built ${IMAGE} | ||
if [[ -n ${BUILD_FOR_CI} ]]; then | ||
docker push ${IMAGE} | ||
echo ${IMAGE} pushed | ||
fi |
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,22 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
source $(dirname $0)/version | ||
|
||
cd $(dirname $0)/.. | ||
|
||
IMAGE=${REPO}/node-disk-manager-webhook:${TAG} | ||
if [[ -n ${BUILD_FOR_CI} ]]; then | ||
IMAGE=ttl.sh/node-disk-manager-webhook-${TAG}:1h | ||
fi | ||
DOCKERFILE=package/Dockerfile.webhook | ||
if [ -e ${DOCKERFILE}.${ARCH} ]; then | ||
DOCKERFILE=${DOCKERFILE}.${ARCH} | ||
fi | ||
|
||
buildx build --load -f ${DOCKERFILE} -t ${IMAGE} . | ||
echo Built ${IMAGE} | ||
if [[ -n ${BUILD_FOR_CI} ]]; then | ||
docker push ${IMAGE} | ||
echo ${IMAGE} pushed | ||
fi |