moved charts/images

This commit is contained in:
2024-10-21 16:17:49 +03:00
parent 606de0934e
commit 148e26cf72
58 changed files with 2020 additions and 16 deletions

27
metal3-chart/Chart.yaml Normal file
View File

@@ -0,0 +1,27 @@
#!BuildTag: %%IMG_PREFIX%%metal3-chart:0.8.1
#!BuildTag: %%IMG_PREFIX%%metal3-chart:0.8.1-%RELEASE%
apiVersion: v2
appVersion: 1.16.0
dependencies:
- alias: metal3-baremetal-operator
name: baremetal-operator
repository: file://./charts/baremetal-operator
version: 0.5.0
- alias: metal3-ironic
name: ironic
repository: file://./charts/ironic
version: 0.7.0
- alias: metal3-mariadb
name: mariadb
repository: file://./charts/mariadb
version: 0.5.4
- alias: metal3-media
condition: global.enable_metal3_media_server
name: media
repository: file://./charts/media
version: 0.5.0
description: A Helm chart that installs all of the dependencies needed for Metal3
icon: https://github.com/cncf/artwork/raw/master/projects/metal3/icon/color/metal3-icon-color.svg
name: metal3
type: application
version: 0.8.1

100
metal3-chart/README.md Normal file
View File

@@ -0,0 +1,100 @@
# Prerequisites
There are two dependencies that are not managed through the metal3 chart because are related to applications that have a cluster-wide scope: `cert-manager` and a LoadBalancer Service provider such as `metallb` or `kube-vip`.
## Cert Manager
In order to successfully deploy metal3 the cluster must have already installed the `cert-manager`.
You can install it through `helm` with:
```bash
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install \
cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--set installCRDs=true
```
, or via `kubectl` with:
```bash
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.1/cert-manager.yaml
```
## MetalLB (Optional)
Ironic currently requires a staticIP address and MetalLB is one option to achieve that.
1. If K3s is used as Kubernetes distribution, then it should be started with `--disable=servicelb` flag. Ref https://metallb.universe.tf/configuration/k3s/
2. Find 1 free IP address in the network.
3. Install `MetalLB` through `helm` with:
```bash
helm repo add suse-edge https://suse-edge.github.io/charts
helm install \
metallb suse-edge/metallb \
--namespace metallb-system \
--create-namespace
```
4. Provide the IP pool configuration with:
```bash
export STATIC_IRONIC_IP=<STATIC_IRONIC_IP>
cat <<-EOF | kubectl apply -f -
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: ironic-ip-pool
namespace: metallb-system
spec:
addresses:
- ${STATIC_IRONIC_IP}/32
serviceAllocation:
priority: 100
serviceSelectors:
- matchExpressions:
- {key: app.kubernetes.io/name, operator: In, values: [metal3-ironic]}
EOF
cat <<-EOF | kubectl apply -f -
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: ironic-ip-pool-l2-adv
namespace: metallb-system
spec:
ipAddressPools:
- ironic-ip-pool
EOF
```
5. Create new values.yaml file that will override some of the default properties:
```bash
TMP_DIR=$(mktemp -d)
cat > ${TMP_DIR}/values.yaml << EOF
global:
ironicIP: "<STATIC_IRONIC_IP>"
EOF
```
# Install
```bash
helm install \
metal3 suse-edge/metal3 \
--namespace metal3-system \
--create-namespace
-f ${TMP_DIR}/values.yaml
```
# How to upgrade the chart
1. Run `helm dependency update .` in this chart to download/update the dependent charts.
2. Identify the appropriate subchart values settings and create an appropriate override values YAML file.
* Ensure that the relevant ironic and baremetal-operator settings match.
3. Install the chart using a command like the following:
```console
$ helm upgrade heavy-metal . --namespace metal-cubed --create-namespace --install --values ~/overrides.yaml
```

15
metal3-chart/_service Normal file
View File

@@ -0,0 +1,15 @@
<services>
<service mode="buildtime" name="kiwi_metainfo_helper"/>
<service name="replace_using_env" mode="buildtime">
<param name="file">values.yaml</param>
<param name="eval">IMG_PREFIX=$(rpm --macros=/root/.rpmmacros -E %img_prefix)</param>
<param name="var">IMG_PREFIX</param>
<param name="eval">IMG_REPO=$(rpm --macros=/root/.rpmmacros -E %img_repo)</param>
<param name="var">IMG_REPO</param>
</service>
<service name="replace_using_env" mode="buildtime">
<param name="file">Chart.yaml</param>
<param name="eval">IMG_PREFIX=$(rpm --macros=/root/.rpmmacros -E %img_prefix)</param>
<param name="var">IMG_PREFIX</param>
</service>
</services>

View File

@@ -0,0 +1 @@
The metal3 chart is a parent chart that installs all of the other charts that a metal3 deployment needs, but doesn't actually deploy any services itself.

BIN
metal3-chart/charts.obscpio Normal file

Binary file not shown.

Binary file not shown.

130
metal3-chart/values.yaml Normal file
View File

@@ -0,0 +1,130 @@
# The metal3 chart is a parent chart that installs
# all of the other charts that a metal3 deployment needs,
# but doesn't actually deploy any services itself.
global:
# IP on which the Ironic services will be exposed
ironicIP: ""
# whether to enable media server.
enable_metal3_media_server: false
# whether to enable dnsmasq on the provisioning network (for PXE boot)
enable_dnsmasq: false
# whether to enable PXE boot capability
# NOTE: enable_dnsmasq must set to 'true' in order for this option to be effective.
enable_pxe_boot: false
# whether to enable tls
enable_tls: true
# whether to enable the TLS of the Virtual Media.
enable_vmedia_tls: true
# whether to enable basic auth
enable_basicAuth: true
auth:
ironicUsername: ""
ironicPassword: ""
ironicInspectorUsername: ""
ironicInspectorPassword: ""
# whether to have additional trusted CA
# NOTE: If enabled, a secret with name tls-ca-additional should be deployed
# The secret should be like this:
# data:
# ca-additional.crt: <b64enc cert>
additionalTrustedCAs: false
# Will be used when tls is enabled
vmediaTLSPort: 6185
# IP address of the router associated with the specified DHCP
# address range
dnsmasqDefaultRouter: ""
# IP address of the dns server to be provided with DHCP
# response
dnsmasqDNSServer: ""
# specify comma-delimited range of IP addresses the DHCP server will manage.
# e.g 192.168.20.20,192.168.20.80
dhcpRange: ""
# Network interface on which provisioning network can be accessed
provisioningInterface: ""
# IP Address assigned to network interface on provisioning network
provisioningIP: ""
# Name for the MariaDB service
databaseServiceName: metal3-mariadb
# In a multi-node cluster use the node selector to ensure the pods
# all run on the same host where the dnsmasqDNSServer and provisioningIP
# and /opt/media exist. Uncomment the nodeSelector and update the
# hostname accordingly.
#nodeSelector:
#kubernetes.io/hostname: "csrancher-n1"
#
# media service
#
# Override any settings for the metal3 media service here
metal3-media:
# location where media files should be placed so that they are
# available to the Ironic deployment services.
mediaVolume:
hostPath: /opt/media
image:
repository: "%%IMG_REPO%%/%%IMG_PREFIX%%ironic"
#
# ironic service
#
# Override any settings for the metal3 ironic service here
# Ensure the storageClass is defined
metal3-ironic:
service:
type: LoadBalancer
persistence:
ironic:
# storageClass for the ironic shared volume
storageClass: ""
images:
ironic:
repository: "%%IMG_REPO%%/%%IMG_PREFIX%%ironic"
ironicIPADownloader:
repository: "%%IMG_REPO%%/%%IMG_PREFIX%%ironic-ipa-downloader"
#
# Database Service
#
# Override any settings for the metal3 mariadb service here
metal3-mariadb:
# storageClass for the mysql datastore
persistence:
storageClass: ""
image:
repository: "registry.suse.com/edge/mariadb"
tag: "10.6.15.1"
#
# Baremetal Operator
#
# Override any settings for the metal3 baremetal-operator service here
metal3-baremetal-operator:
images:
baremetalOperator:
repository: "%%IMG_REPO%%/%%IMG_PREFIX%%baremetal-operator"
rbacProxy:
repository: "%%IMG_REPO%%/%%IMG_PREFIX%%kube-rbac-proxy"
tag: "v0.18.0"