feat: add consul-cni and nomad-autoscaler
Build / build-9 (pull_request) Successful in 1m0s
Build / build-8 (pull_request) Successful in 1m28s

This commit is contained in:
2025-06-13 23:11:37 +10:00
parent 81e2c783c9
commit 263fb689a8
8 changed files with 123 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
1
+25
View File
@@ -0,0 +1,25 @@
# Start with the AlmaLinux 8.10 base image
FROM git.query.consul/unkin/almalinux8-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
# Set working directory
WORKDIR /app
ARG PACKAGE_RELEASE
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
COPY scripts /app/scripts
# Download the required files
RUN dnf install -y unzip && \
wget -O /app/consul-cni.zip https://releases.hashicorp.com/consul-cni/${PACKAGE_VERSION}/consul-cni_${PACKAGE_VERSION}_linux_amd64.zip && \
unzip consul-cni.zip
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
+34
View File
@@ -0,0 +1,34 @@
# nfpm.yaml
name: consul-cni
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: amd64
platform: linux
section: default
priority: extra
description: "Plugin for Consul on Kubernetes to allow configuring traffic redirection rules without escalated container privileges."
maintainer: Hashicorp
homepage: https://hashicorp.com
license: Mozilla Public License, version 2.0
disable_globbing: false
replaces:
- consul-cni
# Files to include in the package
contents:
- src: /app/consul-cni
dst: /opt/cni/bin/consul-cni
file_info:
mode: 0755
owner: root
group: root
# Scripts to run during installation/removal (optional)
scripts:
preinstall: ./scripts/preinstall.sh
# postinstall: ./scripts/postinstall.sh
# preremove: ./scripts/preremove.sh
# postremove: ./scripts/postremove.sh
+2
View File
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
mkdir -p /opt/cni/bin