{"id":20510311,"url":"https://github.com/frobware/haproxy-openshift","last_synced_at":"2026-02-12T01:17:47.451Z","repository":{"id":62053565,"uuid":"432243568","full_name":"frobware/haproxy-openshift","owner":"frobware","description":"Scripts for building haproxy and injecting into an OpenShift router image","archived":false,"fork":false,"pushed_at":"2025-02-04T13:22:49.000Z","size":3910,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-24T07:38:25.119Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frobware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-26T16:42:28.000Z","updated_at":"2025-02-04T13:22:52.000Z","dependencies_parsed_at":"2024-06-20T20:47:12.734Z","dependency_job_id":"b123b487-e8ec-48c8-a476-d9eec0008f3f","html_url":"https://github.com/frobware/haproxy-openshift","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frobware%2Fhaproxy-openshift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frobware%2Fhaproxy-openshift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frobware%2Fhaproxy-openshift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frobware%2Fhaproxy-openshift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frobware","download_url":"https://codeload.github.com/frobware/haproxy-openshift/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242112668,"owners_count":20073647,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T20:28:56.692Z","updated_at":"2026-02-12T01:17:42.396Z","avatar_url":"https://github.com/frobware.png","language":"Go","readme":"# Augment openshift-router image with new haproxy binary\n\nThe scripts in this directory facilitate building a new version of\n`haproxy` and inserting that new binary into an existing\nopenshift-router image.\n\n# Install\n\n### CLone this repo\n\n\t$ git clone https://github.com/frobware/haproxy-openshift\n\t$ cd haproxy-openshift\n\n### Build UBI7 and UBI8 images\n\n\t$ ./toolbox-create-build-containers.sh\n\n\t$ podman images |grep haproxy-builder\n\tlocalhost/haproxy-builder-ubi8                           latest                             80888392c2c2  54 minutes ago     604 MB\n\tlocalhost/haproxy-builder-ubi7                           latest                             9a2d845bc124  55 minutes ago     499 MB\n\nThe script will also create two new containers and they are used by\nthe build script to build haproxy from source:\n\n\t$ toolbox list\n\tIMAGE ID      IMAGE NAME                  CREATED\n\t43d9dec0fe5e  localhost/ubi7-aim:latest   2 hours ago\n\tfccd3ffa629c  localhost/ubi8-aim:latest   2 hours ago\n\n\tCONTAINER ID  CONTAINER NAME        CREATED         STATUS      IMAGE NAME\n\t488e74f64bc9  haproxy-builder-ubi7  9 minutes ago   running     localhost/haproxy-builder-ubi7:latest\n\t86e3086f8fa1  haproxy-builder-ubi8  10 minutes ago  configured  localhost/haproxy-builder-ubi8:latest\n\nCreating these images and containers is a one-off exercise. The script\n`./toolbox-create-build-containers.sh` only needs to be rerun if you\ndelete the containers or images.\n\n# Example workflow\n\n\t$ git clone https://github.com/frobware/haproxy-openshift\n\n## OpenShift v3\n\n\t$ git clone http://git.haproxy.org/git/haproxy-1.8.git/\n\t$ cd haproxy-1.8\n\t$ ../haproxy-openshift/build-image.sh --build-container haproxy-builder-ubi7 --build-script ../haproxy-openshift/build-haproxy-1.8.sh -f ../haproxy-openshift/Dockerfile.3.11 --push-image --dry-run\n\ttoolbox run --container haproxy-builder-ubi7 ../haproxy-openshift/build-haproxy-1.8.sh\n\tpodman build -t amcdermo/openshift-router:ocp-3.11-haproxy-v1.8.28 -f ../haproxy-openshift/Dockerfile.3.11 .\n\tpodman tag amcdermo/openshift-router:ocp-3.11-haproxy-v1.8.28 quay.io/amcdermo/openshift-router:ocp-3.11-haproxy-v1.8.28\n\tpodman push quay.io/amcdermo/openshift-router:ocp-3.11-haproxy-v1.8.28\n\nThe toolbox container (in this case the ubi7 version) is used to build\na new `haproxy` binary from source. The container build then copies\nthe local `./haproxy` binary into the image; see the `COPY` command in\nthe various container files.:\n\n```Dockerfile\nCOPY ./haproxy /usr/sbin/haproxy\n```\n\nFinally the image is tagged and can now be pushed. Once pushed you can\nupdate the openshift deployment to refer to this new image spec.\n\n## OpenShift v4.8 - haproxy-2.2\n\n\t$ git clone http://git.haproxy.org/git/haproxy-2.2.git/\n\t$ cd haproxy-2.2\n\t$ ../haproxy-openshift/build-image.sh --build-container haproxy-builder-ubi8 --build-script ../haproxy-openshift/build-haproxy-2.2.sh -f ../haproxy-openshift/Dockerfile.4.8 --push-image --dry-run\n\ttoolbox run --container haproxy-builder-ubi8 ../haproxy-openshift/build-haproxy-2.2.sh\n\tpodman build -t amcdermo/openshift-router:ocp-4.8-haproxy-v2.2.17 -f ../haproxy-openshift/Dockerfile.4.8 .\n\tpodman tag amcdermo/openshift-router:ocp-4.8-haproxy-v2.2.17 quay.io/amcdermo/openshift-router:ocp-4.8-haproxy-v2.2.17\n\n## OpenShift v4.10 - haproxy-2.4\n\n\t$ git clone http://git.haproxy.org/git/haproxy-2.4.git/\n\t$ cd haproxy-2.4\n\t$ ../haproxy-openshift/build-image.sh --build-container haproxy-builder-ubi8 --build-script ../haproxy-openshift/build-haproxy-2.4.sh -f ../haproxy-openshift/Dockerfile.4.10 --push-image --dry-run\n\ttoolbox run --container haproxy-builder-ubi8 ../haproxy-openshift/build-haproxy-2.4.sh\n\tpodman build -t amcdermo/openshift-router:ocp-4.10-haproxy-v2.4.9 -f ../haproxy-openshift/Dockerfile.4.10 .\n\tpodman tag amcdermo/openshift-router:ocp-4.10-haproxy-v2.4.9 quay.io/amcdermo/openshift-router:ocp-4.10-haproxy-v2.4.9\n\tpodman push quay.io/amcdermo/openshift-router:ocp-4.10-haproxy-v2.4.9\n\n## Overriding various names\n\nThe names that are used for the registry, the registry username, and\nthe image name can all be customised by specifying them explicitly\nwhen invoking `./build-image.sh`.\n\nFor example:\n\n\t$ REGISTRY=docker.io REGISTRY_USERNAME=frobware IMAGENAME=openshift-router-perfscale \\\n\t  ../haproxy-openshift/build-image.sh \\\n\t\t--build-container haproxy-builder-ubi8 \\\n\t\t--build-script ../haproxy-openshift/build-haproxy-2.4.sh \\\n\t\t--containerfile ../haproxy-openshift/Dockerfile.4.10 \\\n\t\t--push-image \\\n\t\t--dry-run\n\ttoolbox run --container haproxy-builder-ubi8 ../haproxy-openshift/build-haproxy-2.4.sh\n\tpodman build -t frobware/openshift-router-perfscale:ocp-4.10-haproxy-v2.4.9 -f ../haproxy-openshift/Dockerfile.4.10 .\n\tpodman tag frobware/openshift-router-perfscale:ocp-4.10-haproxy-v2.4.9 docker.io/frobware/openshift-router-perfscale:ocp-4.10-haproxy-v2.4.9\n\tpodman push docker.io/frobware/openshift-router-perfscale:ocp-4.10-haproxy-v2.4.9\n\n## Injecting a pre-built binary\n\nIf you already have a pre-built `haproxy` binary (e.g., brew build /\nRPM file) then you can inject it without building from source by\nchanging the build script to `/bin/true`. (This was the smallest\nchange I could think of at the time without adding additional flags\nand/or complexity.)\n\n    $ cp /path/to/pre-built/haproxy .\n\t$ TAGNAME=ocp-4.10-haproxy-v2.2.19 REGISTRY_USERNAME=amcdermo IMAGENAME=openshift-router-perfscale \\\n\t\t./build-image.sh \\\n\t\t\t--build-container haproxy-builder-ubi8 \\\n\t\t\t--build-script /bin/true \\\n\t\t\t--containerfile Dockerfile.4.10 \\\n\t\t\t--push-image \\\n\t\t\t--dry-run\n\ttoolbox run --container haproxy-builder-ubi8 /bin/true\n\tpodman build -t amcdermo/openshift-router-perfscale:ocp-4.10-haproxy-v2.2.19 -f Dockerfile.4.10 .\n\tpodman tag amcdermo/openshift-router-perfscale:ocp-4.10-haproxy-v2.2.19 quay.io/amcdermo/openshift-router-perfscale:ocp-4.10-haproxy-v2.2.19\n\tpodman push quay.io/amcdermo/openshift-router-perfscale:ocp-4.10-haproxy-v2.2.19\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrobware%2Fhaproxy-openshift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrobware%2Fhaproxy-openshift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrobware%2Fhaproxy-openshift/lists"}