UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit c0e06fb8 authored by Jonathan Braswell's avatar Jonathan Braswell Committed by Ryan Garcia
Browse files

modify k3d-dev.sh to use ib metallb images

parent edadecb2
No related branches found
No related tags found
1 merge request!3330modify k3d-dev.sh to use ib metallb images
......@@ -688,10 +688,27 @@ fi
# Handle MetalLB cluster resource creation
if [[ "${METAL_LB}" == true || "${ATTACH_SECONDARY_IP}" == true ]]; then
echo "Installing MetalLB..."
run "kubectl create -f https://raw.githubusercontent.com/metallb/metallb/v0.13.9/config/manifests/metallb-native.yaml"
# Wait for controller to be live so that validating webhooks function when we apply the config
echo "Waiting for MetalLB controller..."
run "kubectl wait --for=condition=available --timeout 120s -n metallb-system deployment controller"
until [[ ${REGISTRY_USERNAME} ]]; do
read -p "Please enter your Registry1 username: " REGISTRY_USERNAME
done
until [[ ${REGISTRY_PASSWORD} ]]; do
read -s -p "Please enter your Registry1 password: " REGISTRY_PASSWORD
done
run "kubectl create namespace metallb-system"
run "kubectl create secret docker-registry registry1 \
--docker-server=registry1.dso.mil \
--docker-username=${REGISTRY_USERNAME} \
--docker-password=${REGISTRY_PASSWORD} \
-n metallb-system"
run "mkdir /tmp/metallb"
scp -i ~/.ssh/${KeyName}.pem -o StrictHostKeyChecking=no -o IdentitiesOnly=yes ${SCRIPT_DIR}/metallb/* ubuntu@${PublicIP}:/tmp/metallb
run "kubectl apply -k /tmp/metallb"
# Wait for controller to be live so that validating webhooks function when we apply the config
echo "Waiting for MetalLB controller..."
run "kubectl wait --for=condition=available --timeout 120s -n metallb-system deployment controller"
echo "MetalLB is installed."
if [[ "$METAL_LB" == true ]]; then
......
resources:
- https://raw.githubusercontent.com/metallb/metallb/v0.13.12/config/manifests/metallb-native.yaml
images:
- name: quay.io/metallb/controller
newName: registry1.dso.mil/ironbank/opensource/metallb/controller
newTag: v0.13.12
- name: quay.io/metallb/speaker
newName: registry1.dso.mil/ironbank/opensource/metallb/speaker
newTag: v0.13.12
patches:
- target:
kind: Deployment
name: controller
patch: |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller
spec:
template:
spec:
imagePullSecrets:
- name: registry1
securityContext:
fsGroup: 65532
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
- target:
kind: DaemonSet
name: speaker
patch: |-
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: speaker
spec:
template:
spec:
imagePullSecrets:
- name: registry1
securityContext:
fsGroup: 65532
runAsUser: 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment