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

AWS Elastic Kubernetes Service Kubernetes 1.28 Update #237

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
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
34 changes: 18 additions & 16 deletions .github/workflows/pulumi-aws-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ jobs:
ubuntu-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: syphar/restore-virtualenv@v1
id: pulumi-aws-tests-cache-virtualenv
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
requirement_files: pulumi/python/Pipfile.lock

- uses: syphar/restore-pip-download-cache@v1
if: steps.pulumi-aws-tests-cache-virtualenv.outputs.cache-hit != 'true'
cache: 'pipenv'
python-version-file: '.python-version'
cache-dependency-path: |
pulumi/python/Pipfile.lock

- run: ./setup_venv.sh
working-directory: bin
Expand All @@ -25,22 +23,26 @@ jobs:
working-directory: bin
run: ./test_runner.sh "/home/runner/work/kic-reference-architectures/kic-reference-architectures"

# Hack to make the postjob work by the python gh action not fail since we have the venv elsewhere
- run: mkdir -p /home/runner/.local/share/virtualenvs

macos-tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: syphar/restore-virtualenv@v1
id: pulumi-aws-tests-cache-virtualenv
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
requirement_files: pulumi/python/Pipfile.lock

- uses: syphar/restore-pip-download-cache@v1
if: steps.pulumi-aws-tests-cache-virtualenv.outputs.cache-hit != 'true'
cache: 'pipenv'
python-version-file: '.python-version'
cache-dependency-path: |
pulumi/python/Pipfile.lock

- run: ./setup_venv.sh
working-directory: bin

- name: Test
working-directory: bin
run: ./test_runner.sh "/Users/runner/work/kic-reference-architectures/kic-reference-architectures"

# Hack to make the postjob work by the python gh action not fail since we have the venv elsewhere
- run: mkdir -p /Users/runner/.local/share/virtualenvs
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.12
3.11.6
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python 3.11.6
pulumi 3.92.0
11 changes: 7 additions & 4 deletions bin/setup_venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ function distro_like() {

script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

echo "[DEBUG] script_dir set to $script_dir"

# Unset if defined
unset VIRTUAL_ENV

Expand Down Expand Up @@ -91,7 +93,7 @@ if ! command -v python3 >/dev/null; then

mkdir -p "${PYENV_ROOT}"
git_clone_log="$(mktemp -t pyenv_git_clone-XXXXXXX.log)"
if git clone --depth 1 --branch v2.0.3 https://github.com/pyenv/pyenv.git "${PYENV_ROOT}" 2>"${git_clone_log}"; then
if git clone --depth 1 --branch v2.3.31 https://github.com/pyenv/pyenv.git "${PYENV_ROOT}" 2>"${git_clone_log}"; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

annotation:
Older versions of pyenv don't know about the newer python version we are using.

rm "${git_clone_log}"
else
echo >&2 "Error cloning pyenv repository:"
Expand Down Expand Up @@ -191,6 +193,9 @@ source "${VIRTUAL_ENV}/bin/activate"

set -o nounset # abort on unbound variable

echo "USING PYTHON VERSION $(python --version) FROM $(which python)"
echo "PIP VERSION $(pip3 --version) FROM $(which pip3)"

# Use the latest version of pip and pipenv
pip3 install --upgrade pip
pip3 install pipenv
Expand All @@ -199,9 +204,7 @@ pip3 install pipenv
# in the installation of other build tools and dependencies
# required by the other python packages.
pip3 install wheel

# `pipenv sync` uses only the information in the `Pipfile.lock` ensuring repeatable builds
PIPENV_VERBOSITY=-1 PIPENV_PIPFILE="${script_dir}/../pulumi/python/Pipfile" pipenv sync --dev
pip3 install nodeenv

# Install node.js into virtual environment so that it can be used by Python
# modules that make call outs to it.
Expand Down
2 changes: 1 addition & 1 deletion bin/test-forward.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ kubectl port-forward service/prometheus-kube-prometheus-prometheus --namespace p
echo $! >"$PID04"

## Elasticsearch Tunnel
kubectl port-forward service/elastic-coordinating-only --namespace logstore 9200:9200 &
kubectl port-forward service/elastic-elasticsearch --namespace logstore 9200:9200 &
echo $! >"$PID05"

## Legend
Expand Down
6 changes: 3 additions & 3 deletions config/pulumi/Pulumi.stackname.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ config:
# kic:image_name: docker.io/nginx/nginx-ingress:2.4.2
# kic:image_name: nginx/nginx-ingress:2.4.2
# kic:image_name: nginx/nginx-ingress:2.4.2-alpine
kic:image_name: nginx/nginx-ingress:2.4.2
kic:image_name: nginx/nginx-ingress:3.3.1


############################################################################
Expand Down Expand Up @@ -301,9 +301,9 @@ config:
# Cert Manager Configuration
certmgr:chart_name: cert-manager
# Chart hame for the helm chart for certmanager
certmgr:chart_version: v1.10.0
certmgr:chart_version: v1.12.6
# Chart version for the helm chart for certmanager
certmgr:certmgr_helm_repo_name: jetstack
certmgr:certmgr_helm_repo_name: cert-manager
# Name of the repo to pull the certmanager chart from
certmgr:certmgr_helm_repo_url: https://charts.jetstack.io
# URL of the chart repo to pull certmanager from
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG ARCH=amd64

FROM $ARCH/docker:latest AS docker

FROM $ARCH/debian:bullseye-slim
FROM $ARCH/debian:bookworm-slim
ARG DEBIAN_FRONTEND=noninteractive
ARG UID
ARG GID
Expand Down Expand Up @@ -35,8 +35,8 @@ RUN set -eux; \
nano \
vim \
wget \
zlib1g-dev; \
su --group runner runner --login --command '/pulumi/projects/kic-reference-architectures/bin/setup_venv.sh'; \
zlib1g-dev \
su --group runner runner --login --command '/pulumi/projects/kic-reference-architectures/bin/setup_venv.sh' \
echo 'source /pulumi/projects/kic-reference-architectures/pulumi/python/venv/bin/activate' >> /pulumi/projects/kic-reference-architectures/.bashrc; \
apt-get purge --yes \
gcc \
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG ARCH=amd64

FROM $ARCH/docker:latest AS docker
FROM --platform=linux/amd64 docker:latest AS docker

FROM $ARCH/ubuntu:focal
FROM --platform=linux/amd64 ubuntu:23.04
ARG DEBIAN_FRONTEND=noninteractive
ARG UID
ARG GID
Expand Down
1 change: 1 addition & 0 deletions docker/build_dev_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ i386) ARCH="386" ;;
i686) ARCH="386" ;;
x86_64) ARCH="amd64" ;;
aarch64) ARCH="arm64v8" ;;
arm64) ARCH="arm64v8" ;;
arm) dpkg --print-architecture | grep -q "arm64" && ARCH="arm64v8" || ARCH="arm" ;;
*)
echo >&2 "Unable to determine system architecture."
Expand Down
22 changes: 9 additions & 13 deletions pulumi/python/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,25 @@ verify_ssl = true
name = "pypi"

[packages]
awscli = "~=1.25.35"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

annotation:
The AWS cli has some pretty strict pins on its dependencies. PyYaml specifically. The advice should be to install the v2 aws CLI tool separately.

grpcio = "==1.43.0"
fart = "~=0.1.5"
lolcat = "~=1.4"
passlib = "~=1.7.4"
pulumi-aws = ">=4.39.0"
pulumi-aws = "5.31.0"
pulumi-docker = "==3.1.0"
# pulumi-docker = "~=4.4.4"
pulumi-eks = ">=0.41.2"
pulumi-kubernetes = "==3.20.1"
pulumi-kubernetes = "==3.30.2"
pycryptodome = "~=3.14.0"
requests = "~=2.27.1"
setuptools = "==49.6.0"
setuptools-git-versioning = "==1.9.2"
yamlreader = "==3.0.4"
pulumi-digitalocean = "==4.12.0"
pulumi-linode = "==3.7.1"
linode-cli = "~=5.17.2"
pulumi = "~=3.36.0"
PyYAML = "~=5.4.1"
nodeenv = "~=1.6.0"

[dev-packages]
wheel = "~=0.37.1"
pulumi = "~=3.93"
grpcio = "==1.56.2"
PyYAML = "==6.0.1"
wheel = "0.41.3"
nodeenv = "~=1.6.0"

[requires]
python_version = "3.9"
python_version = "3.11"
Loading
Loading