Skip to content

Commit

Permalink
go 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
sameer mene committed Feb 10, 2024
1 parent 4505e8c commit 1253345
Show file tree
Hide file tree
Showing 10 changed files with 221 additions and 174 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Set configuration for compute and networking by running below commands or direct
pulumi config set dataCenter ash-dc1 # replace with your desired datacenter
pulumi config set networkZone us-east # replace with your desired hcloud network zone
pulumi config set image ubuntu-22.04 # replace with your desired os image (ubuntu-22.04 or centos-7 or centos-stream-8)
pulumi config set bastionFlavor cpx11 # replace with your desired flavor for bastion/NAT node
pulumi config set masterFlavor cpx31 # replace with your desired flavor for clontrol plane nodes
pulumi config set workerFlavor cpx41 # replace with your your desired flavor for worker nodes
pulumi config set lbType lb11 # replace with your desired flavor forload balancer type
Expand All @@ -63,7 +62,7 @@ clusters:
central:
cri: containerd # containerd or docker (defaults to containerd)
cni: flannel # flannel or cilium
kubernetes_version: 1.26 # the highest patch version will be selected automatically
kubernetes_version: 1.29 # the highest patch version will be selected automatically
private_registry: my-docker-registry.com:5000
insecure_registries: # list of docker registries to add to insecure registries
- "10.90.84.113:5000"
Expand Down
10 changes: 4 additions & 6 deletions ansible/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -319,14 +319,12 @@
register: cert_key
- set_fact:
certificate_key: "{{ cert_key.stdout }}"
cp_endpoint: "{% if groups['master']|length > 1 %}{{ hostvars[groups['master'][0]].public_ip}}{% else %}{{ hostvars[groups['master'][0]].private_ip}}{% endif %}"
cp_public_endpoint: "{{ hostvars[groups['master'][0]].public_ip}}"
- set_fact:
extra_args: "{% if cni == 'cilium' %}--skip-phases=addon/kube-proxy{% endif %}"
cp_endpoint: "{{ hostvars[groups['master'][0]].cp_private_ip}}"
cp_public_endpoint: "{{ hostvars[groups['master'][0]].cp_public_ip}}"
- name: Create cluster configuration
template: src=./templates/k8s-configuration.yml.j2 dest=/tmp/k8s-configuration.yml
- name: Init
shell: "kubeadm init {{ extra_args }} --upload-certs --config /tmp/k8s-configuration.yml"
shell: "kubeadm init --upload-certs --config /tmp/k8s-configuration.yml"
args:
creates: /etc/kubernetes/admin.conf
- name: Get join command for control plane
Expand Down Expand Up @@ -428,7 +426,7 @@
register: ds
- block:
- set_fact:
cp_endpoint: "{% if groups['master']|length > 1 %}{{ hostvars[groups['master'][0]].public_ip}}{% else %}{{ hostvars[groups['master'][0]].private_ip}}{% endif %}"
cp_endpoint: "{{ hostvars[groups['master'][0]].cp_private_ip}}"
- name: Download Cilium CNI
get_url:
url: "https://github.com/cilium/cilium-cli/releases/download/v0.14.6/cilium-linux-amd64.tar.gz"
Expand Down
4 changes: 4 additions & 0 deletions ansible/templates/k8s-configuration.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ certificateKey: {{certificate_key}}
{% if kubernetes_version is version('1.24', '>=') and cri == 'docker' %}
nodeRegistration:
criSocket: unix:///var/run/cri-dockerd.sock
{% endif %}
{% if cni == 'cilium' %}
skipPhases:
- addon/kube-proxy
{% endif %}
12 changes: 6 additions & 6 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM golang:1.21-bullseye AS builder
FROM golang:1.22-bullseye AS builder
WORKDIR /usr/src/pulumi-hcloud-kubeadm
COPY ./go/go.mod ./go/go.sum ./
RUN go mod download && go mod verify
COPY ./go/ ./
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -v -o /usr/local/bin/pulumi-hcloud-kubeadm --ldflags "-s -w" .

FROM debian:stable-slim
ARG GO_VERSION="1.21.5"
ARG PULUMI_VERSION="3.97.0"
ARG GO_VERSION="1.22.0"
ARG PULUMI_VERSION="3.105.0"

RUN apt-get update && apt-get install -y python3 python3-pip python3-venv bash curl wget vim jq ansible openssl netcat-openbsd && \
rm -rf /var/lib/apt/lists/* && \
Expand Down Expand Up @@ -45,9 +45,9 @@ COPY --chown=pulumi-hcloud-kubeadm:pulumi-hcloud-kubeadm ./ansible /home/pulumi-

RUN mkdir -p ./vars && \
pulumi login --local && \
pulumi plugin install resource command v0.9.1 --exact && \
pulumi plugin install resource hcloud v1.14.0 --exact && \
pulumi plugin install resource tls v5.0.0 --exact
pulumi plugin install resource command v0.9.2 --exact && \
pulumi plugin install resource hcloud v1.17.0 --exact && \
pulumi plugin install resource tls v5.0.1 --exact

VOLUME /home/pulumi-hcloud-kubeadm/vars

Expand Down
1 change: 0 additions & 1 deletion build/init
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ if ! pulumi stack --show-name --non-interactive 2>/dev/null && ! pulumi stack se
pulumi config set --path dataCenter "fsn1-dc14" --non-interactive
pulumi config set --path networkZone "eu-central" --non-interactive
pulumi config set --path image "ubuntu-22.04" --non-interactive
pulumi config set --path bastionFlavor "cpx11" --non-interactive
pulumi config set --path masterFlavor "cpx31" --non-interactive
pulumi config set --path workerFlavor "cpx41" --non-interactive
pulumi config set --path lbType "lb11" --non-interactive
Expand Down
89 changes: 54 additions & 35 deletions go/go.mod
Original file line number Diff line number Diff line change
@@ -1,78 +1,97 @@
go 1.21
go 1.22

module pulumi-hcloud-kubeadm

require (
github.com/pulumi/pulumi-command/sdk v0.7.2
github.com/pulumi/pulumi-hcloud/sdk v1.14.0
github.com/pulumi/pulumi-tls/sdk/v4 v4.10.0
github.com/pulumi/pulumi/sdk/v3 v3.76.1
github.com/rs/zerolog v1.30.0
github.com/pulumi/pulumi-command/sdk v0.9.2
github.com/pulumi/pulumi-hcloud/sdk v1.17.0
github.com/pulumi/pulumi-tls/sdk/v5 v5.0.1
github.com/pulumi/pulumi/sdk/v3 v3.105.0
github.com/rs/zerolog v1.32.0
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
dario.cat/mergo v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
github.com/agext/levenshtein v1.2.1 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/charmbracelet/bubbles v0.16.1 // indirect
github.com/charmbracelet/bubbletea v0.24.2 // indirect
github.com/charmbracelet/lipgloss v0.7.1 // indirect
github.com/cheggaaa/pb v1.0.29 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/djherbis/times v1.5.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.4.0 // indirect
github.com/go-git/go-git/v5 v5.6.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-git/go-git/v5 v5.11.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.1.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/hcl/v2 v2.16.1 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/hashicorp/hcl/v2 v2.17.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/opentracing/basictracer-go v1.1.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pgavlin/fx v0.1.6 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/term v1.1.0 // indirect
github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect
github.com/pulumi/esc v0.6.2 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/skeema/knownhosts v1.1.0 // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/skeema/knownhosts v1.2.1 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/cobra v1.6.1 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/texttheater/golang-levenshtein v1.0.1 // indirect
github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/zclconf/go-cty v1.12.1 // indirect
github.com/zclconf/go-cty v1.13.2 // indirect
go.uber.org/atomic v1.9.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/term v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.2 // indirect
google.golang.org/protobuf v1.30.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.15.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130 // indirect
google.golang.org/grpc v1.57.1 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/frand v1.4.2 // indirect
sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 // indirect
)
Loading

0 comments on commit 1253345

Please sign in to comment.