Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: build objectstorage-controller image #14

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/rebuild-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
description: 'Arguments for generating build args e.g. SOURCE_IMAGE_VERSION=1.0.6'
type: string
required: false
platforms:
description: 'Comma separated list of platforms to build the image for. A multi-platform image will be built if more than one platform is specified.'
type: string
default: linux/amd64
push:
description: 'Push the image to GHCR'
type: boolean
Expand All @@ -32,6 +36,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand Down Expand Up @@ -68,7 +75,7 @@ jobs:
uses: docker/[email protected]
with:
context: ./${{ inputs.directory }}
platforms: linux/amd64
platforms: ${{ inputs.platforms }}
build-args: ${{ steps.build-args.outputs.value }}
push: ${{ inputs.push }}
load: ${{ ! inputs.push }}
Expand Down
9 changes: 9 additions & 0 deletions cosi/objectstorage-controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# syntax=docker/dockerfile:1

# From image should be `gcr.io/k8s-staging-sig-storage/objectstorage-controller`.
ARG SOURCE_IMAGE

FROM ${SOURCE_IMAGE}

# Same ENTRYPOINT as in the SOURCE_IMAGE
ENTRYPOINT ["/controller"]
17 changes: 17 additions & 0 deletions cosi/objectstorage-controller/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
SOURCE_IMAGE_REPO ?= gcr.io/k8s-staging-sig-storage/objectstorage-controller
SOURCE_IMAGE_VERSION ?= v20250110-a29e5f6
SOURCE_IMAGE ?= $(SOURCE_IMAGE_REPO):$(SOURCE_IMAGE_VERSION)

TARGET_IMAGE_REPO ?= ghcr.io/mesosphere/dkp-container-images/objectstorage-controller
TARGET_IMAGE_VERSION ?= $(SOURCE_IMAGE_VERSION)
TARGET_IMAGE ?= $(TARGET_IMAGE_REPO):$(TARGET_IMAGE_VERSION)

.PHONY: docker-build
docker-build:
docker build --build-arg="SOURCE_IMAGE=$(SOURCE_IMAGE)" -t $(TARGET_IMAGE) .

.PHONY: build-args
build-args:
@echo "SOURCE_IMAGE=$(SOURCE_IMAGE)"
@echo "TARGET_IMAGE=$(TARGET_IMAGE)"
@echo "TARGET_IMAGE_VERSION=$(TARGET_IMAGE_VERSION)"
11 changes: 11 additions & 0 deletions cosi/objectstorage-controller/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# objectstorage-controller

A custom build of `gcr.io/k8s-staging-sig-storage/objectstorage-controller:` container image. The registry hosting this image is being shut down https://console.cloud.google.com/gcr/images/k8s-staging-sig-storage/global/objectstorage-controller.

The Dockerile will be based on the upstream project https://github.com/kubernetes-sigs/container-object-storage-interface/blob/main/controller/Dockerfile.

## Build

```shell
make docker-build
```
9 changes: 9 additions & 0 deletions cosi/objectstorage-sidecar/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# syntax=docker/dockerfile:1

# From image should be `gcr.io/k8s-staging-sig-storage/objectstorage-controller`.
ARG SOURCE_IMAGE

FROM ${SOURCE_IMAGE}

# Same ENTRYPOINT as in the SOURCE_IMAGE
ENTRYPOINT ["/sidecar"]
17 changes: 17 additions & 0 deletions cosi/objectstorage-sidecar/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
SOURCE_IMAGE_REPO ?= gcr.io/k8s-staging-sig-storage/objectstorage-sidecar
SOURCE_IMAGE_VERSION ?= v20250123-a0e4046
SOURCE_IMAGE ?= $(SOURCE_IMAGE_REPO):$(SOURCE_IMAGE_VERSION)

TARGET_IMAGE_REPO ?= ghcr.io/mesosphere/dkp-container-images/objectstorage-sidecar
TARGET_IMAGE_VERSION ?= $(SOURCE_IMAGE_VERSION)
TARGET_IMAGE ?= $(TARGET_IMAGE_REPO):$(TARGET_IMAGE_VERSION)

.PHONY: docker-build
docker-build:
docker build --build-arg="SOURCE_IMAGE=$(SOURCE_IMAGE)" -t $(TARGET_IMAGE) .

.PHONY: build-args
build-args:
@echo "SOURCE_IMAGE=$(SOURCE_IMAGE)"
@echo "TARGET_IMAGE=$(TARGET_IMAGE)"
@echo "TARGET_IMAGE_VERSION=$(TARGET_IMAGE_VERSION)"
11 changes: 11 additions & 0 deletions cosi/objectstorage-sidecar/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# objectstorage-controller
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# objectstorage-controller
# objectstorage-sidecar


A custom build of `gcr.io/k8s-staging-sig-storage/objectstorage-sidecar:` container image. The registry hosting this image is being shut down https://console.cloud.google.com/gcr/images/k8s-staging-sig-storage/global/objectstorage-sidecar.

The Dockerile will be based on the upstream project https://github.com/kubernetes-sigs/container-object-storage-interface/blob/main/sidecar/Dockerfile.

## Build

```shell
make docker-build
```
Loading