-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from pando85/master
Update deps, configurable logging and tagged images
- Loading branch information
Showing
9 changed files
with
578 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Multi-Arch Docker Build and Push to GHCR | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Login to GHCR | ||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx for multiarch images | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build and push Docker image to GHCR | ||
run: | | ||
# Strip git ref prefix from version | ||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | ||
# Strip "v" prefix from tag name | ||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | ||
# Use Docker `latest` tag convention | ||
[ "$VERSION" == "master" ] && VERSION=latest | ||
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 \ | ||
--push \ | ||
-t ghcr.io/${{ github.repository }}:${VERSION} \ | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: prometheus-buckets-usage-exporter | ||
labels: | ||
app.kubernetes.io/name: prometheus-buckets-usage-exporter | ||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 3 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: prometheus-buckets-usage-exporter | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: prometheus-buckets-usage-exporter | ||
spec: | ||
containers: | ||
- image: ghcr.io/pando85/radosgw_usage_exporter:latest | ||
env: | ||
- name: ACCESS_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
key: AccessKey | ||
name: rook-ceph-object-user-us-east-1-buckets-usage-exporter | ||
- name: SECRET_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
key: SecretKey | ||
name: rook-ceph-object-user-us-east-1-buckets-usage-exporter | ||
- name: RADOSGW_SERVER | ||
valueFrom: | ||
secretKeyRef: | ||
key: Endpoint | ||
name: rook-ceph-object-user-us-east-1-buckets-usage-exporter | ||
- name: VIRTUAL_PORT | ||
value: "9242" | ||
- name: STORE | ||
value: eu-central-1a | ||
- name: LOG_LEVEL | ||
value: INFO | ||
- name: TIMEOUT | ||
value: "60" | ||
args: | ||
- --insecure | ||
name: exporter | ||
ports: | ||
- containerPort: 9242 | ||
name: http | ||
protocol: TCP | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 512Mi | ||
requests: | ||
cpu: 10m | ||
memory: 40Mi | ||
livenessProbe: | ||
tcpSocket: | ||
port: http | ||
readinessProbe: | ||
tcpSocket: | ||
port: http | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
readOnlyRootFilesystem: true | ||
securityContext: | ||
runAsNonRoot: true | ||
runAsUser: 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: ceph.rook.io/v1 | ||
kind: CephObjectStoreUser | ||
metadata: | ||
name: buckets-usage-exporter | ||
spec: | ||
store: us-east-1 | ||
displayName: buckets-usage-exporter | ||
capabilities: | ||
bucket: read | ||
metadata: read | ||
usage: read | ||
user: read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: prometheus-buckets-usage-exporter | ||
labels: | ||
app.kubernetes.io/name: prometheus-buckets-usage-exporter | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: prometheus-buckets-usage-exporter | ||
endpoints: | ||
- honorLabels: true | ||
interval: 90s | ||
path: /metrics | ||
port: http | ||
scheme: http | ||
scrapeTimeout: 60s | ||
jobLabel: prometheus-buckets-usage-exporter | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: prometheus-buckets-usage-exporter | ||
labels: | ||
app.kubernetes.io/name: prometheus-buckets-usage-exporter | ||
spec: | ||
selector: | ||
app.kubernetes.io/name: prometheus-buckets-usage-exporter | ||
ports: | ||
- name: http | ||
port: 9242 | ||
protocol: TCP | ||
targetPort: 9242 | ||
|
||
|
Oops, something went wrong.