-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hostnetworkless ironic with nodeports
Signed-off-by: Mohammed Boukhalfa <[email protected]>
- Loading branch information
1 parent
4d26fd8
commit c2e2a8b
Showing
8 changed files
with
141 additions
and
14 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
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,112 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ironic | ||
spec: | ||
replicas: 1 | ||
minReadySeconds: 10 | ||
strategy: | ||
# We cannot run Ironic with more than one replica at a time. The recreate | ||
# strategy makes sure that the old pod is gone before a new is started. | ||
type: Recreate | ||
selector: | ||
matchLabels: | ||
name: ironic | ||
template: | ||
metadata: | ||
labels: | ||
name: ironic | ||
spec: | ||
containers: | ||
- name: ironic | ||
image: quay.io/metal3-io/ironic | ||
imagePullPolicy: Always | ||
command: | ||
- /bin/runironic | ||
volumeMounts: | ||
- mountPath: /shared | ||
name: ironic-data-volume | ||
envFrom: | ||
- configMapRef: | ||
name: ironic-bmo-configmap | ||
securityContext: | ||
allowPrivilegeEscalation: true | ||
privileged: true | ||
runAsUser: 0 # ironic | ||
runAsGroup: 0 # ironic | ||
- name: ironic-log-watch | ||
image: quay.io/metal3-io/ironic | ||
imagePullPolicy: Always | ||
command: | ||
- /bin/runlogwatch.sh | ||
volumeMounts: | ||
- mountPath: /shared | ||
name: ironic-data-volume | ||
securityContext: | ||
allowPrivilegeEscalation: true | ||
privileged: true | ||
runAsUser: 0 # ironic | ||
runAsGroup: 0 # ironic | ||
- name: ironic-httpd | ||
image: quay.io/metal3-io/ironic | ||
imagePullPolicy: Always | ||
command: | ||
- /bin/runhttpd | ||
volumeMounts: | ||
- mountPath: /shared | ||
name: ironic-data-volume | ||
envFrom: | ||
- configMapRef: | ||
name: ironic-bmo-configmap | ||
securityContext: | ||
allowPrivilegeEscalation: true | ||
privileged: true | ||
runAsUser: 0 # ironic | ||
runAsGroup: 0 # ironic | ||
initContainers: | ||
- name: ironic-ipa-downloader | ||
image: quay.io/metal3-io/ironic-ipa-downloader | ||
imagePullPolicy: Always | ||
command: | ||
- /usr/local/bin/get-resource.sh | ||
envFrom: | ||
- configMapRef: | ||
name: ironic-bmo-configmap | ||
volumeMounts: | ||
- mountPath: /shared | ||
name: ironic-data-volume | ||
securityContext: | ||
allowPrivilegeEscalation: true | ||
privileged: true | ||
runAsUser: 0 # ironic | ||
runAsGroup: 0 # ironic | ||
volumes: | ||
- name: ironic-data-volume | ||
emptyDir: {} | ||
securityContext: | ||
runAsNonRoot: false | ||
seccompProfile: | ||
type: RuntimeDefault | ||
fsGroup: 0 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: expose-ironic-to-provisioning-network | ||
spec: | ||
type: NodePort | ||
selector: | ||
name: ironic | ||
ports: | ||
- name: ironic | ||
port: 6385 | ||
targetPort: 6385 | ||
nodePort: 30085 | ||
- name: inspector | ||
port: 5050 | ||
targetPort: 5050 | ||
nodePort: 30050 | ||
- name: httpd | ||
port: 30080 | ||
targetPort: 30080 | ||
nodePort: 30080 |
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 |
---|---|---|
|
@@ -64,7 +64,10 @@ | |
state: absent | ||
namespace: "{{ IRONIC_NAMESPACE }}" | ||
when: EPHEMERAL_CLUSTER == "minikube" | ||
|
||
|
||
- name: delete ironic ip | ||
shell: "minikube ssh sudo ip addr del 172.22.0.2/24 dev ironicendpoint" | ||
|
||
- name: Label baremetalhost CRD to pivot. | ||
shell: "kubectl label --overwrite crds baremetalhosts.metal3.io {{ item }}" | ||
with_items: | ||
|
@@ -122,6 +125,8 @@ | |
args: | ||
chdir: "{{ BMOPATH }}" | ||
|
||
- name: add ironic ip | ||
shell: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no [email protected] sudo ip addr add 172.22.0.2/24 dev ironicendpoint" | ||
# Install Ironic | ||
- name: Install Ironic | ||
shell: "{{ BMOPATH }}/tools/deploy.sh -i {{ BMO_IRONIC_ARGS }}" | ||
|
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 |
---|---|---|
|
@@ -9,6 +9,10 @@ | |
namespace: "{{ IRONIC_NAMESPACE }}" | ||
kubeconfig: "/tmp/kubeconfig-{{ CLUSTER_NAME }}.yaml" | ||
|
||
- name: delete ironic ip | ||
shell: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no [email protected] sudo ip addr del 172.22.0.2/24 dev ironicendpoint" | ||
- name: add ironic ip | ||
shell: "minikube ssh sudo ip addr add 172.22.0.2/24 dev ironicendpoint" | ||
# Install BMO in Source cluster | ||
- name: Install Baremetal Operator in Source cluster | ||
shell: "{{ BMOPATH }}/tools/deploy.sh -b {{ BMO_IRONIC_ARGS }}" | ||
|
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