Skip to content

Commit a638258

Browse files
authored
Move image from personal dockerhub to ghcr (#135)
* Move image from personal dockerhub to ghcr Signed-off-by: clux <sszynrae@gmail.com> * try out with short name Signed-off-by: clux <sszynrae@gmail.com> * need login off while we test Signed-off-by: clux <sszynrae@gmail.com> * regen Signed-off-by: clux <sszynrae@gmail.com> * guess it's expected for cd to fail first time with this setup Signed-off-by: clux <sszynrae@gmail.com> --------- Signed-off-by: clux <sszynrae@gmail.com>
1 parent 11db59a commit a638258

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
tags:
99
- '*'
1010

11+
permissions:
12+
contents: read
13+
packages: write
14+
1115
jobs:
1216
docker-base:
1317
runs-on: ubuntu-latest
@@ -22,7 +26,7 @@ jobs:
2226
uses: docker/metadata-action@v5
2327
id: meta
2428
with:
25-
images: clux/controller
29+
images: ghcr.io/${{ github.repository_owner }}/controller
2630
tags: |
2731
type=pep440,pattern={{version}}
2832
type=raw,value=latest,enable={{is_default_branch}}
@@ -32,8 +36,9 @@ jobs:
3236
uses: docker/login-action@v3
3337
if: github.event_name != 'pull_request'
3438
with:
35-
username: ${{ secrets.DOCKERHUB_USERNAME }}
36-
password: ${{ secrets.DOCKERHUB_TOKEN }}
39+
registry: ghcr.io
40+
username: ${{ github.repository_owner }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
3742

3843
- uses: actions/cache@v4
3944
with:
@@ -94,7 +99,7 @@ jobs:
9499
uses: docker/metadata-action@v5
95100
id: meta
96101
with:
97-
images: clux/controller
102+
images: ghcr.io/${{ github.repository_owner }}/controller
98103
tags: |
99104
type=pep440,pattern={{version}},prefix=otel-
100105
type=raw,value=otel,enable={{is_default_branch}}
@@ -124,8 +129,9 @@ jobs:
124129
uses: docker/login-action@v3
125130
if: github.event_name != 'pull_request'
126131
with:
127-
username: ${{ secrets.DOCKERHUB_USERNAME }}
128-
password: ${{ secrets.DOCKERHUB_TOKEN }}
132+
registry: ghcr.io
133+
username: ${{ github.repository_owner }}
134+
password: ${{ secrets.GITHUB_TOKEN }}
129135

130136
- name: Docker buildx and push with telemetry
131137
uses: docker/build-push-action@v6
@@ -201,7 +207,7 @@ jobs:
201207
- uses: Swatinem/rust-cache@v2
202208
- uses: nolar/setup-k3d-k3s@v1
203209
with:
204-
version: v1.25
210+
version: v1.31
205211
k3d-name: kube
206212
k3d-args: "--no-lb --no-rollback --k3s-arg --disable=traefik,servicelb,metrics-server@server:*"
207213

@@ -211,7 +217,7 @@ jobs:
211217
run: cargo run --bin crdgen | kubectl apply -f -
212218
- name: Run all default features integration library tests
213219
run: cargo test --lib --all -- --ignored
214-
220+
215221
unit:
216222
runs-on: ubuntu-latest
217223
steps:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
## controller-rs
22
[![ci](https://github.com/kube-rs/controller-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/kube-rs/controller-rs/actions/workflows/ci.yml)
3-
[![docker image](https://img.shields.io/docker/pulls/clux/controller.svg)](
4-
https://hub.docker.com/r/clux/controller/tags/)
53

64
A rust kubernetes reference controller for a [`Document` resource](https://github.com/kube-rs/controller-rs/blob/main/yaml/crd.yaml) using [kube](https://github.com/kube-rs/kube/), with observability instrumentation.
75

@@ -26,6 +24,8 @@ kubectl wait --for=condition=available deploy/doc-controller --timeout=30s
2624
kubectl port-forward service/doc-controller 8080:80
2725
```
2826

27+
The helm chart sets up the [container](https://github.com/kube-rs/controller-rs/pkgs/container/controller) built from this repository.
28+
2929
### Opentelemetry
3030

3131
Build and run with `telemetry` feature, or configure it via `helm`:

charts/doc-controller/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace: "default"
44
version: "" # pin a specific version
55

66
image:
7-
repository: clux/controller
7+
repository: ghcr.io/kube-rs/controller
88
pullPolicy: IfNotPresent
99

1010
imagePullSecrets: []

yaml/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ spec:
139139
{}
140140
containers:
141141
- name: doc-controller
142-
image: clux/controller:0.15.0
142+
image: ghcr.io/kube-rs/controller:0.15.0
143143
imagePullPolicy: IfNotPresent
144144
securityContext:
145145
{}

0 commit comments

Comments
 (0)