Add kubeadm-utility image

This image will have all the necessary kubernetes binaries
for kubeadm related operations.

Change-Id: I301e5fa0b26bad8c49b021d2c267620d940628ed
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
This commit is contained in:
Ruslan Aliev
2025-06-20 12:05:47 -05:00
parent 807a222e26
commit 2f1cc5e48c
9 changed files with 140 additions and 7 deletions

View File

@@ -11,7 +11,7 @@ LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc
# Squid 19.2.1
ARG CEPH_RELEASE=squid
ARG CEPH_RELEASE_TAG=19.2.1-1jammy
ARG KUBE_VERSION=1.33.1
ARG KUBE_VERSION=1.33.2
ARG CEPH_REPO=https://mirror.mirantis.com/acicd/ceph-${CEPH_RELEASE}/
ARG CEPH_KEY=https://mirror.mirantis.com/acicd/ceph-${CEPH_RELEASE}/release.asc

View File

@@ -8,7 +8,7 @@ LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc
org.opencontainers.image.vendor='The Airship Authors' \
org.opencontainers.image.licenses='Apache-2.0'
ARG KUBE_VERSION=1.33.1
ARG KUBE_VERSION=1.33.2
ARG DEBIAN_FRONTEND=noninteractive
@@ -39,8 +39,8 @@ RUN set -xe \
&& curl -s https://bootstrap.pypa.io/get-pip.py | python3 \
&& pip3 install --no-cache-dir \
oslo.rootwrap==7.2.0 \
&& curl --silent -L https://dl.k8s.io/v${KUBE_VERSION}/kubernetes-node-linux-amd64.tar.gz \
| tar -zC /usr/bin --strip-components=3 --wildcards -x "*/*/*/kube*" \
&& curl --silent -L https://dl.k8s.io/v${KUBE_VERSION}/kubernetes-client-linux-amd64.tar.gz \
| tar -zC /usr/bin --strip-components=3 --wildcards -x "*/*/*/kubectl" \
&& rm -rf /var/lib/apt/lists/*
RUN PYTHON_LOCATION=$(pip3 show oslo.rootwrap|grep Location|awk '{print $2}') \

View File

@@ -9,7 +9,7 @@ LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc
org.opencontainers.image.licenses='Apache-2.0'
ARG ETCDCTL_VERSION=3.5.12
ARG KUBE_VERSION=1.33.1
ARG KUBE_VERSION=1.33.2
ENV GOOGLE_URL=https://storage.googleapis.com/etcd
ENV GITHUB_URL=https://github.com/etcd-io/etcd/releases/download

View File

@@ -0,0 +1,36 @@
ARG FROM=quay.io/airshipit/ubuntu:jammy
FROM ${FROM}
LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc://#airshipit@freenode' \
org.opencontainers.image.url='https://airshipit.org' \
org.opencontainers.image.documentation='https://opendev.org/airship/porthole' \
org.opencontainers.image.source='https://opendev.org/airship/porthole' \
org.opencontainers.image.vendor='The Airship Authors' \
org.opencontainers.image.licenses='Apache-2.0'
ARG KUBE_VERSION=1.33.2
ARG DEBIAN_FRONTEND=noninteractive
RUN set -xe \
&& sed -i '/nobody/d' /etc/passwd \
&& echo "nobody:x:65534:65534:nobody:/nonexistent:/bin/bash" >> /etc/passwd \
&& apt-get update && apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
bash \
ca-certificates \
curl \
gnupg \
jq \
moreutils \
rsync \
sudo \
xz-utils \
python3.10 \
python3-pip \
&& curl --silent -L --remote-name-all --output-dir /usr/bin \
https://dl.k8s.io/v${KUBE_VERSION}/bin/linux/amd64/{kubeadm,kubelet,kubectl} \
&& chmod +x /usr/bin/kubeadm /usr/bin/kubectl /usr/bin/kubelet \
&& rm -rf /var/lib/apt/lists/*
CMD ["/bin/bash"]

View File

@@ -0,0 +1,38 @@
# Compute-utility Container
This container enables Operations personnel to access services running on
the compute nodes. Operations personnel can get the appropriate data from this
utility container by specifying the node and respective service command within
the local cluster.
## Usage
1. Get into the utility pod using `kubectl exec`. Perform an operation as in
the following example.
```
kubectl exec -it <POD_NAME> -n utility /bin/bash
```
2. Use the following syntax to run commands.
```
utilscli <client-name> <server-hostname> <command> <options>
```
Example:
```
utilscli libvirt-client node42 virsh list
```
Accepted client names are:
* libvirt-client
* ovs-client
* ipmi-client
* perccli-client
* numa-client
* sos-client
Commands for each client vary with the client.

View File

@@ -8,7 +8,7 @@ LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc
org.opencontainers.image.vendor='The Airship Authors' \
org.opencontainers.image.licenses='Apache-2.0'
ARG KUBE_VERSION=1.33.1
ARG KUBE_VERSION=1.33.2
ARG MARIADB_VERSION=10.6
ARG PERCONA_TOOLKIT_VERSION=3.5.7

View File

@@ -8,7 +8,7 @@ LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc
org.opencontainers.image.vendor='The Airship Authors' \
org.opencontainers.image.licenses='Apache-2.0'
ARG KUBE_VERSION=1.33.1
ARG KUBE_VERSION=1.33.2
ARG DEBIAN_FRONTEND=noninteractive

View File

@@ -22,6 +22,7 @@
- airship-porthole-images-jammy-build-calicoctl-utility
- airship-porthole-images-jammy-build-ceph-utility
- airship-porthole-images-jammy-build-compute-utility
- airship-porthole-images-jammy-build-kubeadm-utility
- airship-porthole-images-jammy-build-etcdctl-utility
- airship-porthole-images-jammy-build-mysqlclient-utility
- airship-porthole-images-jammy-build-openstack-utility
@@ -43,6 +44,7 @@
- airship-porthole-images-jammy-build-calicoctl-utility
- airship-porthole-images-jammy-build-ceph-utility
- airship-porthole-images-jammy-build-compute-utility
- airship-porthole-images-jammy-build-kubeadm-utility
- airship-porthole-images-jammy-build-etcdctl-utility
- airship-porthole-images-jammy-build-mysqlclient-utility
- airship-porthole-images-jammy-build-openstack-utility
@@ -55,6 +57,7 @@
- airship-porthole-images-jammy-publish-calicoctl-utility
- airship-porthole-images-jammy-publish-ceph-utility
- airship-porthole-images-jammy-publish-compute-utility
- airship-porthole-images-jammy-publish-kubeadm-utility
- airship-porthole-images-jammy-publish-etcdctl-utility
- airship-porthole-images-jammy-publish-mysqlclient-utility
- airship-porthole-images-jammy-publish-openstack-utility

View File

@@ -0,0 +1,56 @@
---
# Copyright 2019 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- job:
name: airship-porthole-images-build-kubeadm-utility
parent: airship-porthole-images
abstract: true
vars:
image_name: porthole-kubeadm-utility
files:
- ^images/kubeadm-utility/.*$
- ^Makefile$
- ^tools/.*$
- ^zuul.d/.*$
- job:
name: airship-porthole-images-publish-kubeadm-utility
parent: airship-porthole-images
abstract: true
secrets: &secrets
- name: quay_credentials
secret: quay_credentials
pass-to-parent: true
vars:
image_name: porthole-kubeadm-utility
publish: true
tags:
dynamic:
commit: true
- job:
name: airship-porthole-images-jammy-build-kubeadm-utility
parent: airship-porthole-images-build-kubeadm-utility
vars:
distro_suffix: ubuntu_jammy
- job:
name: airship-porthole-images-jammy-publish-kubeadm-utility
parent: airship-porthole-images-publish-kubeadm-utility
secrets: *secrets
vars:
distro_suffix: ubuntu_jammy
...