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

Portefaix version label support #630

Closed
wants to merge 6 commits into from
Closed
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
38 changes: 38 additions & 0 deletions hack/scripts/portefaix-labels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright (C) 2021 Nicolas Lamirault <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

NO_COLOR="\033[0m"
DEBUG_COLOR="\e[34m"
INFO_COLOR="\e[32m"
ERROR_COLOR="\e[31m"
WARN_COLOR="\e[35m"

label="portefaix.xyz/version"

function usage() {
echo "Usage: $0 <manifests> <version>"
}

manifests=$1
[ -z "${manifests}" ] && echo "Environment not satisfied" && exit 1
version=$2
[ -z "${version}" ] && echo "Version not satisfied" && exit 1

IFS="
"
for file in $(grep -R ${label} ${manifests}/*); do
filename=$(echo ${file} | awk -F":" '{ print $1 }')
echo -e "${INFO_COLOR}Update file: ${filename}${NO_COLOR}"
sed -i "s#${label}:.*#${label}: ${version}#g" ${filename}
done
3 changes: 3 additions & 0 deletions kubernetes/base/chaos-mesh/chaos-mesh/chaos-mesh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ spec:
cleanupOnFail: true
timeout: 10m
values:
customLabels:
portefaix.xyz: v0.13.0

controllerManager:
# image: pingcap/chaos-mesh:v1.0.2
resources:
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/base/dns/external-dns/external-dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
targetNamespace: dns
values:
podLabels:
portefaix.xyz/version: v0.11.0
portefaix.xyz/version: v0.13.0
metrics:
enabled: true
serviceMonitor:
Expand Down
4 changes: 2 additions & 2 deletions kubernetes/base/flux-system/charts/vouch-proxy-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
name: oauth2-proxy-charts
name: halkeye-charts
namespace: flux-system
spec:
interval: 24h
url: https://oauth2-proxy.github.io/manifests
url: https://halkeye.github.io/helm-charts
timeout: 3m
3 changes: 3 additions & 0 deletions kubernetes/base/identity/oauth2-proxy/oauth2-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ spec:
releaseName: oauth2-proxy
targetNamespace: identity
values:
# TODO: https://github.com/oauth2-proxy/manifests/pull/25
# customLabels:
# portefaix.xyz/version: v0.13.0
image:
repository: "quay.io/oauth2-proxy/oauth2-proxy"
tag: v7.1.3
4 changes: 2 additions & 2 deletions kubernetes/base/identity/vouch-proxy/vouch-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ spec:
chart:
spec:
# renovate: registryUrl=https://halkeye.github.io/helm-charts/
chart: vouch-proxy
chart: vouch
version: 2.0.0
sourceRef:
kind: HelmRepository
name: vouch-proxy-charts
name: halkeye-charts
namespace: flux-system
interval: 5m
releaseName: vouch-proxy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ spec:
releaseName: ingress-nginx
targetNamespace: ingress-controllers
values:
# TODO: https://github.com/kubernetes/ingress-nginx/pull/7186
# commonLabels:
# portefaix.xyz/version: v0.13.0
controller:
# image:
# repository: k8s.gcr.io/ingress-nginx/controller
Expand Down
4 changes: 2 additions & 2 deletions kubernetes/base/litmus/kubernetes-chaos/kubernetes-chaos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ spec:
timeout: 1m
cleanupOnFail: true
values:
# customLabels:
# portefaix.xyz/version: v0.11.0
customLabels:
portefaix.xyz/version: v0.13.0
2 changes: 2 additions & 0 deletions kubernetes/base/litmus/litmus-chaos/litmus-chaos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ spec:
timeout: 1m
cleanupOnFail: true
values:
customLabels:
portefaix.xyz/version: v0.13.0
# operator:
# image:
# repository: litmuschaos/chaos-operator
Expand Down
4 changes: 4 additions & 0 deletions kubernetes/base/logging/loki/loki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ spec:
releaseName: loki
targetNamespace: logging
values:
# TODO: https://github.com/grafana/helm-charts/pull/463
# customLabels:
# portefaix.xyz/version: v0.13.0

# image:
# repository: grafana/loki
# tag: 2.0.0
Expand Down
5 changes: 3 additions & 2 deletions kubernetes/base/logging/vector/vector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ spec:
releaseName: vector-agent
targetNamespace: logging
values:
podAnnotations:
portefaix.xyz/version: v0.11.0
# TODO: https://github.com/timberio/vector/pull/7687
# customLabels:
# portefaix.xyz/version: v0.13.0

serviceAccount:
create: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ spec:
timeout: 10m
values:
additionalLabels:
portefaix.xyz/version: v1.0.0
portefaix.xyz/version: v0.13.0
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
timeout: 20m
values:
commonLabels:
portefaix.xyz/version: v1.0.0
portefaix.xyz/version: v0.13.0
defaultRules:
runbookUrl: "https://github.com/portefaix/portefaix/tree/master/runbook.md#"

Expand Down Expand Up @@ -91,7 +91,7 @@ spec:
grafana:
enabled: true
extraLabels:
portefaix.xyz/version: v1.0.0
portefaix.xyz/version: v0.13.0

defaultDashboardsEnabled: true

Expand Down Expand Up @@ -563,4 +563,4 @@ spec:
nodeExporter:
enabled: true
podLabels:
portefaix.xyz/version: v1.0.0
portefaix.xyz/version: v0.13.0
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ spec:
timeout: 10m
values:
additionalLabels:
portefaix.xyz/version: v1.0.0
portefaix.xyz/version: v0.13.0
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ spec:
timeout: 10m
values:
additionalLabels:
portefaix.xyz/version: v1.0.0
portefaix.xyz/version: v0.13.0
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ spec:
timeout: 10m
values:
additionalLabels:
portefaix.xyz/version: v1.0.0
portefaix.xyz/version: v0.13.0
3 changes: 3 additions & 0 deletions kubernetes/base/monitoring/snmp-exporter/snmp-exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ spec:
cleanupOnFail: true
timeout: 10m
values:
# TODO: https://github.com/prometheus-community/helm-charts/pull/1028/
# customLabels:
# portefaix.xyz/version: v0.13.0
serviceMonitor:
enabled: true
selector:
Expand Down
6 changes: 5 additions & 1 deletion kubernetes/base/monitoring/thanos/thanos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ spec:
cleanupOnFail: true
timeout: 10m
values:
# TODO: https://github.com/banzaicloud/banzai-charts/pull/1256
# customLabels:
# portefaix.xyz/version: v0.13.0

image:
# image:
# repository: quay.io/thanos/thanos
# tag: v0.16.0

objstoreSecretOverride: thanos-objstore-config

store:
Expand Down
3 changes: 3 additions & 0 deletions kubernetes/base/multimedia/flood/flood.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ spec:
timeout: 1m
cleanupOnFail: true
timeout: 10m
values:
controllerLabels:
portefaix.xyz/version: v0.13.0
2 changes: 1 addition & 1 deletion kubernetes/base/networking/speedtest/speedtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
timeout: 10m
values:
additionalLabels:
portefaix.xyz/version: v0.11.0
portefaix.xyz/version: v0.13.0

additionalAnnotations:
a8r.io/description: Prometheus exporter that runs speedtest and exposes results
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/base/storage/nfs/nfs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
targetNamespace: storage
values:
labels:
portefaix.xyz/version: v0.11.0
portefaix.xyz/version: v0.13.0

# nfs:
# server: xx.xx.xx.xx
Expand Down