Skip to content

Commit

Permalink
feat: Initial demo script using CAPI Docker provider
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmidyson committed Nov 22, 2022
1 parent ca3dbd9 commit ef307e2
Show file tree
Hide file tree
Showing 6 changed files with 985 additions and 243 deletions.
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
clusterctl 1.2.6
ginkgo 2.5.0
gojq 0.12.9
golang 1.19.3
golangci-lint 1.50.1
goreleaser 1.12.3
Expand Down
239 changes: 0 additions & 239 deletions hack/demo.sh

This file was deleted.

10 changes: 10 additions & 0 deletions hack/demo/Dockerfile.demo-node
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2022 D2iQ, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# syntax=docker/dockerfile:1

FROM --platform=linux/${TARGETARCH} mesosphere/kind-node:v1.25.4

ARG TARGETARCH
COPY dist/shim-credential-provider_linux_${TARGETARCH}_v1/shim-credential-provider /etc/kubernetes/image-credential-provider/
COPY dist/static-credential-provider_linux_${TARGETARCH}_v1/static-credential-provider /etc/kubernetes/image-credential-provider/
8 changes: 4 additions & 4 deletions hack/airgapped-demo.sh → hack/demo/airgapped-demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ IFS=$'\n\t'
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
readonly SCRIPT_DIR

readonly ROOT_DIR="${SCRIPT_DIR}/.."
pushd "${SCRIPT_DIR}/../.."

readonly DEMODATA_DIR="${ROOT_DIR}/demodata"
readonly DEMODATA_DIR="demodata"
rm -rf "${DEMODATA_DIR}" && mkdir -p "${DEMODATA_DIR}"

export KIND_EXPERIMENTAL_DOCKER_NETWORK=shim-credentials-airgapped-kind-network
Expand All @@ -22,8 +22,8 @@ REGISTRY_IP=$(docker network inspect "${KIND_EXPERIMENTAL_DOCKER_NETWORK}" |
REGISTRY_PORT=5000
# Use a domain so it can be access on a Mac
REGISTRY_ADDRESS=registry-airgapped
REGISTRY_CERTS_DIR="${DEMODATA_DIR}/certs"
REGISTRY_AUTH_DIR="${DEMODATA_DIR}/auth"
REGISTRY_CERTS_DIR="$(realpath "${DEMODATA_DIR}/certs")"
REGISTRY_AUTH_DIR="$(realpath "${DEMODATA_DIR}/auth")"
REGISTRY_USERNAME=testuser
REGISTRY_PASSWORD=testpassword

Expand Down
Loading

0 comments on commit ef307e2

Please sign in to comment.