fix: Release 1.22.8, minor upgrade fixes, bump prometheus max. memory

This commit is contained in:
Stefan Reimer 2022-05-16 10:15:41 +02:00
parent 4eed7218c3
commit 975d166bec
8 changed files with 54 additions and 11 deletions

View File

@ -16,6 +16,7 @@ RUN cd /etc/apk/keys && \
cri-tools@kubezero \ cri-tools@kubezero \
kubeadm@kubezero~=${KUBE_VERSION} \ kubeadm@kubezero~=${KUBE_VERSION} \
kubectl@kubezero~=${KUBE_VERSION} \ kubectl@kubezero~=${KUBE_VERSION} \
etcdhelper@kubezero \
etcd-ctl@testing \ etcd-ctl@testing \
restic@testing \ restic@testing \
helm@testing helm@testing

View File

@ -160,7 +160,7 @@ Kubernetes: `>= 1.20.0`
| kube-prometheus-stack.prometheus.prometheusSpec.logFormat | string | `"json"` | | | kube-prometheus-stack.prometheus.prometheusSpec.logFormat | string | `"json"` | |
| kube-prometheus-stack.prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues | bool | `false` | | | kube-prometheus-stack.prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues | bool | `false` | |
| kube-prometheus-stack.prometheus.prometheusSpec.portName | string | `"http-prometheus"` | | | kube-prometheus-stack.prometheus.prometheusSpec.portName | string | `"http-prometheus"` | |
| kube-prometheus-stack.prometheus.prometheusSpec.resources.limits.memory | string | `"3Gi"` | | | kube-prometheus-stack.prometheus.prometheusSpec.resources.limits.memory | string | `"4Gi"` | |
| kube-prometheus-stack.prometheus.prometheusSpec.resources.requests.cpu | string | `"500m"` | | | kube-prometheus-stack.prometheus.prometheusSpec.resources.requests.cpu | string | `"500m"` | |
| kube-prometheus-stack.prometheus.prometheusSpec.resources.requests.memory | string | `"512Mi"` | | | kube-prometheus-stack.prometheus.prometheusSpec.resources.requests.memory | string | `"512Mi"` | |
| kube-prometheus-stack.prometheus.prometheusSpec.retention | string | `"8d"` | | | kube-prometheus-stack.prometheus.prometheusSpec.retention | string | `"8d"` | |

View File

@ -108,7 +108,7 @@ kube-prometheus-stack:
memory: 512Mi memory: 512Mi
cpu: 500m cpu: 500m
limits: limits:
memory: 3Gi memory: 4Gi
# cpu: "1000m" # cpu: "1000m"
walCompression: true walCompression: true

View File

@ -26,14 +26,14 @@ Kubernetes: `>= 1.20.0`
|-----|------|---------|-------------| |-----|------|---------|-------------|
| HighAvailableControlplane | bool | `false` | | | HighAvailableControlplane | bool | `false` | |
| addons.enabled | bool | `false` | | | addons.enabled | bool | `false` | |
| addons.targetRevision | string | `"0.5.2"` | | | addons.targetRevision | string | `"0.5.3"` | |
| argocd.enabled | bool | `false` | | | argocd.enabled | bool | `false` | |
| argocd.istio.enabled | bool | `false` | | | argocd.istio.enabled | bool | `false` | |
| argocd.namespace | string | `"argocd"` | | | argocd.namespace | string | `"argocd"` | |
| argocd.targetRevision | string | `"0.10.1"` | | | argocd.targetRevision | string | `"0.10.1"` | |
| cert-manager.enabled | bool | `false` | | | cert-manager.enabled | bool | `false` | |
| cert-manager.namespace | string | `"cert-manager"` | | | cert-manager.namespace | string | `"cert-manager"` | |
| cert-manager.targetRevision | string | `"0.9.0"` | | | cert-manager.targetRevision | string | `"0.9.1"` | |
| istio-ingress.chart | string | `"kubezero-istio-gateway"` | | | istio-ingress.chart | string | `"kubezero-istio-gateway"` | |
| istio-ingress.enabled | bool | `false` | | | istio-ingress.enabled | bool | `false` | |
| istio-ingress.gateway.service | object | `{}` | | | istio-ingress.gateway.service | object | `{}` | |

View File

@ -8,7 +8,7 @@ HighAvailableControlplane: false
addons: addons:
enabled: false enabled: false
targetRevision: 0.5.2 targetRevision: 0.5.3
network: network:
enabled: false enabled: false
@ -18,7 +18,7 @@ network:
cert-manager: cert-manager:
enabled: false enabled: false
namespace: cert-manager namespace: cert-manager
targetRevision: 0.9.0 targetRevision: 0.9.1
storage: storage:
enabled: false enabled: false

27
docs/inf1-test.yaml Normal file
View File

@ -0,0 +1,27 @@
apiVersion: v1
kind: Pod
metadata:
labels:
app: neuron-top
name: neuron-top
namespace: default
spec:
containers:
- image: public.ecr.aws/zero-downtime/dumpster:latest
command:
- "bash"
- "-c"
- "/opt/aws/neuron/bin/neuron-ls && sleep 3600"
imagePullPolicy: IfNotPresent
name: neuron-top
resources:
limits:
#hugepages-2Mi: 256Mi
aws.amazon.com/neuron: 1
requests:
memory: 1024Mi
tolerations:
- effect: NoSchedule
key: kubezero-workergroup
operator: Equal
value: public

View File

@ -186,7 +186,7 @@ elif [[ "$1" =~ "^(bootstrap|restore|join)$" ]]; then
render_kubeadm render_kubeadm
# Esnure clean slate if bootstrap, restore PKI otherwise # Ensure clean slate if bootstrap, restore PKI otherwise
if [[ "$1" =~ "^(bootstrap)$" ]]; then if [[ "$1" =~ "^(bootstrap)$" ]]; then
rm -rf ${HOSTFS}/var/lib/etcd/member rm -rf ${HOSTFS}/var/lib/etcd/member
@ -235,6 +235,11 @@ elif [[ "$1" =~ "^(bootstrap|restore|join)$" ]]; then
_kubeadm init phase kubeconfig all _kubeadm init phase kubeconfig all
if [[ "$1" =~ "^(join)$" ]]; then if [[ "$1" =~ "^(join)$" ]]; then
# Delete any former self in case forseti did not delete yet
kubectl delete node ${NODENAME} --wait=true || true
# Wait for all pods to be deleted otherwise we end up with stale pods eg. kube-proxy and all goes to ....
kubectl delete pods -n kube-system --field-selector spec.nodeName=${NODENAME}
# get current running etcd pods for etcdctl commands # get current running etcd pods for etcdctl commands
while true; do while true; do
etcd_endpoints=$(kubectl get pods -n kube-system -l component=etcd -o yaml | \ etcd_endpoints=$(kubectl get pods -n kube-system -l component=etcd -o yaml | \
@ -273,9 +278,6 @@ elif [[ "$1" =~ "^(bootstrap|restore|join)$" ]]; then
| .etcd.initialCluster = strenv(ETCD_INITIAL_CLUSTER) | .etcd.initialCluster = strenv(ETCD_INITIAL_CLUSTER)
' ${HOSTFS}/etc/kubernetes/kubezero.yaml ' ${HOSTFS}/etc/kubernetes/kubezero.yaml
render_kubeadm render_kubeadm
# Delete any former self in case forseti did not delete yet
kubectl delete node ${NODENAME} --wait=true || true
fi fi
# Generate our custom etcd yaml # Generate our custom etcd yaml
@ -290,6 +292,19 @@ elif [[ "$1" =~ "^(bootstrap|restore|join)$" ]]; then
echo "Waiting for Kubernetes API to be online ..." echo "Waiting for Kubernetes API to be online ..."
retry 0 5 30 kubectl cluster-info --request-timeout 3 >/dev/null retry 0 5 30 kubectl cluster-info --request-timeout 3 >/dev/null
# Update providerID as underlying VM changed during restore
if [[ "$1" =~ "^(restore)$" ]]; then
PROVIDER_ID=$(yq eval '.providerID' ${HOSTFS}/etc/kubernetes/kubezero.yaml)
if [ -n "$PROVIDER_ID" ]; then
etcdhelper \
-cacert ${HOSTFS}/etc/kubernetes/pki/etcd/ca.crt \
-cert ${HOSTFS}/etc/kubernetes/pki/etcd/server.crt \
-key ${HOSTFS}/etc/kubernetes/pki/etcd/server.key \
-endpoint https://${ETCD_NODENAME}:2379 \
change-provider-id ${NODENAME} $PROVIDER_ID
fi
fi
if [[ ! "$1" =~ "^(join)$" ]]; then if [[ ! "$1" =~ "^(join)$" ]]; then
_kubeadm init phase upload-config all _kubeadm init phase upload-config all
_kubeadm init phase upload-certs --skip-certificate-key-print _kubeadm init phase upload-certs --skip-certificate-key-print

View File

@ -15,7 +15,7 @@ parser = argparse.ArgumentParser(description="Update Route53 entries")
parser.add_argument( parser.add_argument(
"--version", "--version",
dest="version", dest="version",
default="1.22.8-7", default="1.22.8-8",
action="store", action="store",
required=False, required=False,
help="Update KubeZero version", help="Update KubeZero version",