Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,8 @@ build:

.PHONY: deploy
deploy:
echo "{ \"kind\": \"Namespace\", \"apiVersion\": \"v1\", \"metadata\": { \"name\": \"$(RUN_NAMESPACE)\", \"labels\": { \"name\": \"$(RUN_NAMESPACE)\" } } }" | kubectl apply -f -
kubectl apply -f deploy/service_account.yaml -n $(RUN_NAMESPACE)
kubectl apply -f deploy/role.yaml -n $(RUN_NAMESPACE)
kubectl apply -f deploy/role_binding.yaml
kubectl apply -f deploy/crds/metal3_v1alpha1_baremetalhost_crd.yaml
kubectl apply -f deploy/ironic_bmo_configmap.yaml -n $(RUN_NAMESPACE)
kubectl apply -f deploy/mariadb-password.yaml -n $(RUN_NAMESPACE)
kubectl apply -f deploy/operator_ironic.yaml -n $(RUN_NAMESPACE)
cd deploy && kustomize edit set namespace $(RUN_NAMESPACE) && cd ..
kustomize build deploy | kubectl apply -f -

.PHONY: dep-check
dep-check:
Expand Down
8 changes: 8 additions & 0 deletions deploy/ironic_bmo_configmap.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
HTTP_PORT=6180
PROVISIONING_INTERFACE=eth2
DHCP_RANGE=172.22.0.10,172.22.0.100
DEPLOY_KERNEL_URL=http://172.22.0.2:6180/images/ironic-python-agent.kernel
DEPLOY_RAMDISK_URL=http://172.22.0.2:6180/images/ironic-python-agent.initramfs
IRONIC_ENDPOINT=http://172.22.0.2:6385/v1/
IRONIC_INSPECTOR_ENDPOINT=http://172.22.0.2:5050/v1/
CACHEURL=http://172.22.0.1/images
13 changes: 0 additions & 13 deletions deploy/ironic_bmo_configmap.yaml

This file was deleted.

19 changes: 19 additions & 0 deletions deploy/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: metal3
resources:
- namespace.yaml
- service_account.yaml
- role.yaml
- role_binding.yaml
- crds/metal3_v1alpha1_baremetalhost_crd.yaml
- operator_ironic.yaml
configMapGenerator:
- envs:
- ironic_bmo_configmap.env
name: ironic-bmo-configmap
secretGenerator:
- literals:
- password=changeme
name: mariadb-password
type: Opaque
8 changes: 0 additions & 8 deletions deploy/mariadb-password.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions deploy/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: metal3
89 changes: 19 additions & 70 deletions deploy/operator_ironic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
hostNetwork: true
containers:
- name: baremetal-operator
image: quay.io/metal3-io/baremetal-operator:master
image: quay.io/metal3-io/baremetal-operator
ports:
- containerPort: 60000
name: metrics
Expand All @@ -34,26 +34,9 @@ spec:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "baremetal-operator"
- name: DEPLOY_KERNEL_URL
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: deploy_kernel_url
- name: DEPLOY_RAMDISK_URL
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: deploy_ramdisk_url
- name: IRONIC_ENDPOINT
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: ironic_endpoint
- name: IRONIC_INSPECTOR_ENDPOINT
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: ironic_inspector_endpoint
envFrom:
- configMapRef:
name: ironic-bmo-configmap
- name: ironic-dnsmasq
image: quay.io/metal3-io/ironic
imagePullPolicy: Always
Expand All @@ -64,22 +47,9 @@ spec:
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
env:
- name: HTTP_PORT
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: http_port
- name: DHCP_RANGE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: dhcp_range
- name: PROVISIONING_INTERFACE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: interface
envFrom:
- configMapRef:
name: ironic-bmo-configmap
- name: mariadb
image: quay.io/metal3-io/ironic
imagePullPolicy: Always
Expand All @@ -106,17 +76,9 @@ spec:
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
env:
- name: PROVISIONING_INTERFACE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: interface
- name: HTTP_PORT
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: http_port
envFrom:
- configMapRef:
name: ironic-bmo-configmap
- name: ironic
image: quay.io/metal3-io/ironic
imagePullPolicy: Always
Expand All @@ -127,33 +89,23 @@ spec:
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
envFrom:
- configMapRef:
name: ironic-bmo-configmap
env:
- name: MARIADB_PASSWORD
valueFrom:
secretKeyRef:
name: mariadb-password
key: password
- name: HTTP_PORT
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: http_port
- name: PROVISIONING_INTERFACE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: interface
- name: ironic-inspector
image: quay.io/metal3-io/ironic-inspector
imagePullPolicy: Always
securityContext:
privileged: true
env:
- name: PROVISIONING_INTERFACE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: interface
envFrom:
- configMapRef:
name: ironic-bmo-configmap
initContainers:
- name: ironic-ipa-downloader
image: quay.io/metal3-io/ironic-ipa-downloader
Expand All @@ -162,12 +114,9 @@ spec:
- /usr/local/bin/get-resource.sh
securityContext:
privileged: true
env:
- name: CACHEURL
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: cacheurl
envFrom:
- configMapRef:
name: ironic-bmo-configmap
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
Expand Down