Skip to content

Commit 1d0a6e8

Browse files
authored
Merge pull request #1 from Webfleet-Solutions/feature/prepare-fork
Prepare fork with README and CI adaptations
2 parents 908b3b0 + 3f52f5d commit 1d0a6e8

File tree

8 files changed

+126
-121
lines changed

8 files changed

+126
-121
lines changed

.github/workflows/build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Test and build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
pull_request:
9+
branches:
10+
- master
11+
12+
13+
permissions: write-all
14+
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/setup-go@v4
20+
with:
21+
go-version: '1.19'
22+
23+
- uses: actions/[email protected]
24+
25+
- name: Test With Coverage
26+
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
27+
- name: Upload coverage to Codecov
28+
uses: codecov/[email protected]
29+
with:
30+
files: coverage.txt
31+
32+
- name: golangci-lint
33+
uses: golangci/[email protected]
34+
with:
35+
args: --timeout=5m
36+
# since go test already does it in a previous step
37+
skip-pkg-cache: true
38+
39+
build-image:
40+
runs-on: ubuntu-latest
41+
needs: test
42+
steps:
43+
-
44+
name: Set up QEMU
45+
uses: docker/setup-qemu-action@v3
46+
-
47+
name: Set up Docker Buildx
48+
uses: docker/setup-buildx-action@v3
49+
-
50+
name: Build image
51+
uses: docker/build-push-action@v5
52+
with:
53+
# Only for CI testing purposes
54+
push: false
55+
tags: wfs/k8s-image-availability-exporter:latest

.github/workflows/chart.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

.github/workflows/push-image.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and push image
2+
3+
on:
4+
5+
# publish on releases, e.g. v2.1.13 (image tagged as "2.1.13" - "v" prefix is removed)
6+
release:
7+
types: [ published ]
8+
9+
# publish on pushes to the main branch (image tagged as "latest")
10+
push:
11+
branches:
12+
- master
13+
14+
permissions: write-all
15+
16+
jobs:
17+
docker:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Build and publish a Docker image for ${{ github.repository }}
23+
uses: macbre/push-to-ghcr@master
24+
with:
25+
context: "."
26+
dockerfile: ./Dockerfile
27+
image_name: ${{ github.repository }}
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release Charts
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
permissions:
11+
contents: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Configure Git
20+
run: |
21+
git config user.name "$GITHUB_ACTOR"
22+
git config user.email "[email protected]"
23+
24+
- name: Run chart-releaser
25+
uses: helm/[email protected]
26+
with:
27+
charts_dir: helm/charts
28+
env:
29+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# k8s-image-availability-exporter
22

3+
This is a fork aiming at fixing or at least circumventing the problems described in [Issue #7 of the upstream repository](https://github.com/deckhouse/k8s-image-availability-exporter/issues/7).
4+
5+
As the upstream repo uses private build infrastructure, the CI process has been adapted and the master branch of this repo should not be merged into the upstream repo for this reason.
6+
7+
To add a feature in this repository: Create a new branch in from the upstream repo as described [here](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository).
8+
Then, merge your feature branch in both this repositories and the upstream `master` branches.
9+
10+
---
311
k8s-image-availability-exporter (or *k8s-iae* for short) is a Prometheus exporter that warns you proactively about images that are defined in Kubernetes objects (e.g., an `image` field in the Deployment) but are not available in the container registry (such as Docker Registry, etc.).
412

513
Receiving alerts when container images related to running Kubernetes controllers are missing helps you to solve the problem before it manifests itself. For more details on the reasons behind k8s-iae and how it works, please read [this article](https://medium.com/flant-com/prometheus-exporter-to-check-kubernetes-images-availability-26c306c44c08).

helm/charts/k8s-image-availability-exporter/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ This chart bootstraps a [k8s-image-availability-exporter](https://github.com/fla
1313
To install the chart with the release name `my-release`:
1414

1515
```bash
16-
helm repo add flant_common_github https://charts.flant.com/common/github
16+
helm repo add webfleet-k8s-iae https://Webfleet-Solutions.github.io/k8s-image-availability-exporter
1717
helm repo update
18-
helm install my-release flant_common_github/k8s-image-availability-exporter
18+
helm install my-release webfleet-k8s-iae/k8s-image-availability-exporter
1919
```
2020

2121
The command deploys k8s-image-availability-exporter on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
@@ -40,8 +40,8 @@ The following tables list the configurable parameters of the k8s-image-availabil
4040
| Parameter | Description | Default |
4141
| ----- | ----------- | ------ |
4242
| `k8sImageAvailabilityExporter.image.pullPolicy` | Image pull policy to use for the k8s-image-availability-exporter deployment | `IfNotPresent` |
43-
| `k8sImageAvailabilityExporter.image.repository` | Repository to use for the k8s-image-availability-exporter deployment | `flant/k8s-image-availability-exporter` |
44-
| `k8sImageAvailabilityExporter.image.tag` | Tag to use for the k8s-image-availability-exporter deployment | `v0.1.13` |
43+
| `k8sImageAvailabilityExporter.image.repository` | Repository to use for the k8s-image-availability-exporter deployment | `ghcr.io/Webfleet-Solutions/k8s-image-availability-exporter` |
44+
| `k8sImageAvailabilityExporter.image.tag` | Tag to use for the k8s-image-availability-exporter deployment | `latest` |
4545
| `k8sImageAvailabilityExporter.replicas` | Number of instances to deploy for a k8s-image-availability-exporter deployment. | `1` |
4646
| `k8sImageAvailabilityExporter.resources` | Resource limits for k8s-image-availability-exporter | `{}` |
4747
| `serviceMonitor.enabled` | Create [Prometheus Operator](https://github.com/coreos/prometheus-operator) serviceMonitor resource | `false` |

helm/charts/k8s-image-availability-exporter/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
k8sImageAvailabilityExporter:
22
image:
3-
repository: registry.deckhouse.io/k8s-image-availability-exporter/k8s-image-availability-exporter
4-
tag: v0.5.1
3+
repository: ghcr.io/Webfleet-Solutions/k8s-image-availability-exporter
4+
tag: latest
55
pullPolicy: IfNotPresent
66
replicas: 1
77
resources: {}

0 commit comments

Comments
 (0)