Upgrade base OS to Alpine 3.19, minor ElastiCache fix

This commit is contained in:
Stefan Reimer 2024-04-05 13:27:05 +00:00
parent d7bf6542ce
commit 1175a38d8b
2 changed files with 15 additions and 7 deletions

View File

@ -2,11 +2,15 @@
# libexec is missing from >=3.17
# Stage 1 - bundle base image + runtime
FROM python:3.11-alpine3.16 AS python-alpine
FROM python:3.12-alpine3.19 AS python-alpine
ARG ALPINE="v3.19"
# Install GCC (Alpine uses musl but we compile and link dependencies with GCC)
RUN apk upgrade -U --available --no-cache && \
apk add --no-cache \
RUN echo "@kubezero https://cdn.zero-downtime.net/alpine/${ALPINE}/kubezero" >> /etc/apk/repositories && \
wget -q -O /etc/apk/keys/stefan@zero-downtime.net-61bb6bfb.rsa.pub https://cdn.zero-downtime.net/alpine/stefan@zero-downtime.net-61bb6bfb.rsa.pub
RUN apk -U --no-cache upgrade && \
apk --no-cache add \
libstdc++
@ -15,8 +19,7 @@ FROM python-alpine AS build-image
ARG TAG="latest"
# Install aws-lambda-cpp build dependencies
RUN apk upgrade -U --available --no-cache && \
apk add --no-cache \
RUN apk --no-cache add \
build-base \
libtool \
autoconf \
@ -25,8 +28,8 @@ RUN apk upgrade -U --available --no-cache && \
cmake \
libcurl \
libffi-dev \
libexecinfo-dev \
openssl-dev
openssl-dev \
libexecinfo-dev@kubezero
# cargo
# Install requirements

5
app.py
View File

@ -261,6 +261,11 @@ def handler(event, context):
title = "ElastiCache fail over complete"
body = "for node {}".format(msg["ElastiCache:FailoverComplete"])
# ElasticCache update notifications
elif "ElastiCache:ServiceUpdateAvailableForNode" in msg:
title = "ElastiCache update available"
body = "for node {}".format(msg["ElastiCache:ServiceUpdateAvailableForNode"])
# known RDS events
elif "Event Source" in msg and msg['Event Source'] in ["db-instance", "db-cluster-snapshot", "db-snapshot"]:
try: