1
0
Fork 0

switch back to client-side apply

This commit is contained in:
Massaki Archambault 2023-03-01 13:35:08 -05:00
parent 9018280bca
commit 0e018aac82
13 changed files with 66 additions and 10 deletions

View File

@ -3,8 +3,10 @@ KUSTOMIZEFLAGS =
KUBECTL = kubectl KUBECTL = kubectl
KUBECTLFLAGS = KUBECTLFLAGS =
KUBECTLDIFFFLAGS = --server-side=true --force-conflicts KUBECTLDIFFFLAGS =
KUBECTLAPPLYFLAGS = --server-side=true --force-conflicts --prune KUBECTLDIFFPRINTER = highlight --out-format xterm256 --syntax diff
KUBECTLAPPLYFLAGS = --prune
KUBECTLAPPLYPRINTER = sed -E -e 's/(.+configured)/\o033[32m\1\o033[0m/g' -e 's/(.+pruned)/\o033[31m\1\o033[0m/g'
SRC := $(shell find kustomize/ -type f) SRC := $(shell find kustomize/ -type f)
OUT = build OUT = build
@ -13,15 +15,15 @@ PRODOUT = $(OUT)/prod.yaml
PRODSRC = kustomize/env/prod PRODSRC = kustomize/env/prod
.PHONY: prod .PHONY: prod
prod: prod-diff prod: diff
.PHONY: diff .PHONY: diff
prod-diff: $(PRODOUT) diff: $(PRODOUT)
$(KUBECTL) $(KUBECTLFLAGS) diff $(KUBECTLDIFFFLAGS) -f $(PRODOUT) | highlight --out-format xterm256 --syntax diff $(KUBECTL) $(KUBECTLFLAGS) diff $(KUBECTLDIFFFLAGS) -f $(PRODOUT) | $(KUBECTLDIFFCOLOR)
.PHONY: apply .PHONY: apply
prod-apply: $(PRODOUT) apply: $(PRODOUT)
$(KUBECTL) $(KUBECTLFLAGS) apply $(KUBECTLAPPLYFLAGS) -l app.kubernetes.io/managed-by=kustomize -f $(PRODOUT) $(KUBECTL) $(KUBECTLFLAGS) apply $(KUBECTLAPPLYFLAGS) -l app.kubernetes.io/managed-by=kustomize -f $(PRODOUT) | $(KUBECTLAPPLYPRINTER)
$(PRODOUT): $(SRC) $(PRODOUT): $(SRC)
mkdir -p $(OUT) mkdir -p $(OUT)

View File

@ -0,0 +1,12 @@
resources:
- https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.63.0/bundle.yaml
patches:
- path: patches/alertmanagerconfigs.yaml
- path: patches/alertmanagers.yaml
- path: patches/podmonitors.yaml
- path: patches/probes.yaml
- path: patches/prometheuses.yaml
- path: patches/prometheusrules.yaml
- path: patches/servicemonitors.yaml
- path: patches/thanosrulers.yaml

View File

@ -0,0 +1,5 @@
$patch: delete
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: alertmanagerconfigs.monitoring.coreos.com

View File

@ -0,0 +1,5 @@
$patch: delete
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: alertmanagers.monitoring.coreos.com

View File

@ -0,0 +1,5 @@
$patch: delete
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: podmonitors.monitoring.coreos.com

View File

@ -0,0 +1,5 @@
$patch: delete
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: probes.monitoring.coreos.com

View File

@ -0,0 +1,5 @@
$patch: delete
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: prometheuses.monitoring.coreos.com

View File

@ -0,0 +1,5 @@
$patch: delete
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: prometheusrules.monitoring.coreos.com

View File

@ -0,0 +1,5 @@
$patch: delete
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: servicemonitors.monitoring.coreos.com

View File

@ -0,0 +1,5 @@
$patch: delete
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: thanosrulers.monitoring.coreos.com

View File

@ -1,5 +1,6 @@
resources: resources:
- https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.63.0/bundle.yaml - bundle/
- https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.63.0/stripped-down-crds.yaml
namespace: kube-system namespace: kube-system

View File

@ -40,7 +40,7 @@ spec:
cpu: 2000m cpu: 2000m
memory: 2Gi memory: 2Gi
limits: limits:
cpu: 3000m cpu: 2000m
memory: 2Gi memory: 2Gi
storage: storage:
volumeClaimTemplate: volumeClaimTemplate:

View File

@ -1,3 +1,4 @@
- job_name: additional/bastion-haproxy - job_name: additional/bastion-haproxy
static_configs: static_configs:
- targets: ["192.168.20.10:8080"] - targets: ["192.168.20.10:8080"]