hetzner: Update integration tests

This commit is contained in:
Ciprian Hacman 2022-10-23 12:39:12 +03:00
parent 4e5ded6dc3
commit 810151fc31
21 changed files with 126 additions and 370 deletions

View File

@ -2,7 +2,7 @@ apiVersion: kops.k8s.io/v1alpha2
kind: Cluster kind: Cluster
metadata: metadata:
creationTimestamp: "2017-01-01T00:00:00Z" creationTimestamp: "2017-01-01T00:00:00Z"
name: minimal.k8s.local name: ha.example.com
spec: spec:
api: api:
loadBalancer: loadBalancer:
@ -11,7 +11,7 @@ spec:
rbac: {} rbac: {}
channel: stable channel: stable
cloudProvider: hetzner cloudProvider: hetzner
configBase: memfs://tests/minimal.k8s.local configBase: memfs://tests/ha.example.com
etcdClusters: etcdClusters:
- cpuRequest: 200m - cpuRequest: 200m
etcdMembers: etcdMembers:
@ -42,7 +42,6 @@ spec:
- 0.0.0.0/0 - 0.0.0.0/0
- ::/0 - ::/0
kubernetesVersion: v1.25.0 kubernetesVersion: v1.25.0
masterPublicName: api.minimal.k8s.local
networkCIDR: 10.0.0.0/16 networkCIDR: 10.0.0.0/16
networking: networking:
cni: {} cni: {}
@ -56,7 +55,7 @@ spec:
zone: fsn1 zone: fsn1
topology: topology:
dns: dns:
type: Public type: None
masters: public masters: public
nodes: public nodes: public
@ -67,7 +66,7 @@ kind: InstanceGroup
metadata: metadata:
creationTimestamp: "2017-01-01T00:00:00Z" creationTimestamp: "2017-01-01T00:00:00Z"
labels: labels:
kops.k8s.io/cluster: minimal.k8s.local kops.k8s.io/cluster: ha.example.com
name: master-fsn1-1 name: master-fsn1-1
spec: spec:
image: ubuntu-20.04 image: ubuntu-20.04
@ -85,7 +84,7 @@ kind: InstanceGroup
metadata: metadata:
creationTimestamp: "2017-01-01T00:00:00Z" creationTimestamp: "2017-01-01T00:00:00Z"
labels: labels:
kops.k8s.io/cluster: minimal.k8s.local kops.k8s.io/cluster: ha.example.com
name: master-fsn1-2 name: master-fsn1-2
spec: spec:
image: ubuntu-20.04 image: ubuntu-20.04
@ -103,7 +102,7 @@ kind: InstanceGroup
metadata: metadata:
creationTimestamp: "2017-01-01T00:00:00Z" creationTimestamp: "2017-01-01T00:00:00Z"
labels: labels:
kops.k8s.io/cluster: minimal.k8s.local kops.k8s.io/cluster: ha.example.com
name: master-fsn1-3 name: master-fsn1-3
spec: spec:
image: ubuntu-20.04 image: ubuntu-20.04
@ -121,7 +120,7 @@ kind: InstanceGroup
metadata: metadata:
creationTimestamp: "2017-01-01T00:00:00Z" creationTimestamp: "2017-01-01T00:00:00Z"
labels: labels:
kops.k8s.io/cluster: minimal.k8s.local kops.k8s.io/cluster: ha.example.com
name: nodes-fsn1 name: nodes-fsn1
spec: spec:
image: ubuntu-20.04 image: ubuntu-20.04

View File

@ -1,5 +1,5 @@
CloudProvider: hetzner CloudProvider: hetzner
ClusterName: minimal.k8s.local ClusterName: ha.example.com
Image: ubuntu-20.04 Image: ubuntu-20.04
KubernetesVersion: v1.25.0 KubernetesVersion: v1.25.0
MasterCount: 3 MasterCount: 3

View File

@ -34,7 +34,6 @@ spec:
- 0.0.0.0/0 - 0.0.0.0/0
- ::/0 - ::/0
kubernetesVersion: v1.25.0 kubernetesVersion: v1.25.0
masterPublicName: api.minimal.k8s.local
networkCIDR: 10.0.0.0/16 networkCIDR: 10.0.0.0/16
networking: networking:
cni: {} cni: {}
@ -48,7 +47,7 @@ spec:
zone: fsn1 zone: fsn1
topology: topology:
dns: dns:
type: Public type: Private
masters: public masters: public
nodes: public nodes: public

View File

@ -2,7 +2,7 @@ apiVersion: kops.k8s.io/v1alpha2
kind: Cluster kind: Cluster
metadata: metadata:
creationTimestamp: "2017-01-01T00:00:00Z" creationTimestamp: "2017-01-01T00:00:00Z"
name: minimal.k8s.local name: minimal.example.com
spec: spec:
api: api:
loadBalancer: loadBalancer:
@ -23,8 +23,8 @@ spec:
leaderElect: false leaderElect: false
cloudProvider: hetzner cloudProvider: hetzner
clusterDNSDomain: cluster.local clusterDNSDomain: cluster.local
configBase: memfs://tests/minimal.k8s.local configBase: memfs://tests/minimal.example.com
configStore: memfs://tests/minimal.k8s.local configStore: memfs://tests/minimal.example.com
containerRuntime: containerd containerRuntime: containerd
containerd: containerd:
logLevel: info logLevel: info
@ -35,7 +35,7 @@ spec:
skipInstall: true skipInstall: true
etcdClusters: etcdClusters:
- backups: - backups:
backupStore: memfs://tests/minimal.k8s.local/backups/etcd/main backupStore: memfs://tests/minimal.example.com/backups/etcd/main
cpuRequest: 200m cpuRequest: 200m
etcdMembers: etcdMembers:
- instanceGroup: master-fsn1 - instanceGroup: master-fsn1
@ -44,7 +44,7 @@ spec:
name: main name: main
version: 3.5.4 version: 3.5.4
- backups: - backups:
backupStore: memfs://tests/minimal.k8s.local/backups/etcd/events backupStore: memfs://tests/minimal.example.com/backups/etcd/events
cpuRequest: 100m cpuRequest: 100m
etcdMembers: etcdMembers:
- instanceGroup: master-fsn1 - instanceGroup: master-fsn1
@ -52,12 +52,10 @@ spec:
memoryRequest: 100Mi memoryRequest: 100Mi
name: events name: events
version: 3.5.4 version: 3.5.4
externalDns:
provider: dns-controller
iam: iam:
allowContainerRegistry: true allowContainerRegistry: true
legacy: false legacy: false
keyStore: memfs://tests/minimal.k8s.local/pki keyStore: memfs://tests/minimal.example.com/pki
kubeAPIServer: kubeAPIServer:
allowPrivileged: true allowPrivileged: true
anonymousAuth: false anonymousAuth: false
@ -96,8 +94,8 @@ spec:
requestheaderUsernameHeaders: requestheaderUsernameHeaders:
- X-Remote-User - X-Remote-User
securePort: 443 securePort: 443
serviceAccountIssuer: https://api.internal.minimal.k8s.local serviceAccountIssuer: https://api.internal.minimal.example.com
serviceAccountJWKSURI: https://api.internal.minimal.k8s.local/openid/v1/jwks serviceAccountJWKSURI: https://api.internal.minimal.example.com/openid/v1/jwks
serviceClusterIPRange: 100.64.0.0/13 serviceClusterIPRange: 100.64.0.0/13
storageBackend: etcd3 storageBackend: etcd3
kubeControllerManager: kubeControllerManager:
@ -105,7 +103,7 @@ spec:
attachDetachReconcileSyncPeriod: 1m0s attachDetachReconcileSyncPeriod: 1m0s
cloudProvider: external cloudProvider: external
clusterCIDR: 100.96.0.0/11 clusterCIDR: 100.96.0.0/11
clusterName: minimal.k8s.local clusterName: minimal.example.com
configureCloudRoutes: false configureCloudRoutes: false
image: registry.k8s.io/kube-controller-manager:v1.25.0 image: registry.k8s.io/kube-controller-manager:v1.25.0
leaderElection: leaderElection:
@ -157,7 +155,7 @@ spec:
- 0.0.0.0/0 - 0.0.0.0/0
- ::/0 - ::/0
kubernetesVersion: 1.25.0 kubernetesVersion: 1.25.0
masterInternalName: api.internal.minimal.k8s.local masterInternalName: api.internal.minimal.example.com
masterKubelet: masterKubelet:
anonymousAuth: false anonymousAuth: false
cgroupDriver: systemd cgroupDriver: systemd
@ -175,13 +173,12 @@ spec:
registerSchedulable: true registerSchedulable: true
shutdownGracePeriod: 30s shutdownGracePeriod: 30s
shutdownGracePeriodCriticalPods: 10s shutdownGracePeriodCriticalPods: 10s
masterPublicName: api.minimal.k8s.local
networkCIDR: 10.0.0.0/16 networkCIDR: 10.0.0.0/16
networking: networking:
cni: {} cni: {}
nonMasqueradeCIDR: 100.64.0.0/10 nonMasqueradeCIDR: 100.64.0.0/10
podCIDR: 100.96.0.0/11 podCIDR: 100.96.0.0/11
secretStore: memfs://tests/minimal.k8s.local/secrets secretStore: memfs://tests/minimal.example.com/secrets
serviceClusterIPRange: 100.64.0.0/13 serviceClusterIPRange: 100.64.0.0/13
sshAccess: sshAccess:
- 0.0.0.0/0 - 0.0.0.0/0
@ -192,6 +189,6 @@ spec:
zone: fsn1 zone: fsn1
topology: topology:
dns: dns:
type: Public type: None
masters: public masters: public
nodes: public nodes: public

View File

@ -12,11 +12,11 @@ spec:
- /bin/sh - /bin/sh
- -c - -c
- mkfifo /tmp/pipe; (tee -a /var/log/etcd.log < /tmp/pipe & ) ; exec /etcd-manager - mkfifo /tmp/pipe; (tee -a /var/log/etcd.log < /tmp/pipe & ) ; exec /etcd-manager
--backup-store=memfs://tests/minimal.k8s.local/backups/etcd/events --client-urls=https://__name__:4002 --backup-store=memfs://tests/minimal.example.com/backups/etcd/events --client-urls=https://__name__:4002
--cluster-name=etcd-events --containerized=true --dns-suffix=internal.minimal.k8s.local --cluster-name=etcd-events --containerized=true --dns-suffix=.internal.minimal.example.com
--grpc-port=3997 --peer-urls=https://__name__:2381 --quarantine-client-urls=https://__name__:3995 --grpc-port=3997 --peer-urls=https://__name__:2381 --quarantine-client-urls=https://__name__:3995
--v=6 --volume-name-tag=kops.k8s.io/instance-group=master-fsn1 --volume-provider=hetzner --v=6 --volume-name-tag=kops.k8s.io/instance-group=master-fsn1 --volume-provider=hetzner
--volume-tag=kops.k8s.io/cluster=minimal.k8s.local --volume-tag=kops.k8s.io/volume-role=events --volume-tag=kops.k8s.io/cluster=minimal.example.com --volume-tag=kops.k8s.io/volume-role=events
> /tmp/pipe 2>&1 > /tmp/pipe 2>&1
env: env:
- name: HCLOUD_TOKEN - name: HCLOUD_TOKEN

View File

@ -12,11 +12,11 @@ spec:
- /bin/sh - /bin/sh
- -c - -c
- mkfifo /tmp/pipe; (tee -a /var/log/etcd.log < /tmp/pipe & ) ; exec /etcd-manager - mkfifo /tmp/pipe; (tee -a /var/log/etcd.log < /tmp/pipe & ) ; exec /etcd-manager
--backup-store=memfs://tests/minimal.k8s.local/backups/etcd/main --client-urls=https://__name__:4001 --backup-store=memfs://tests/minimal.example.com/backups/etcd/main --client-urls=https://__name__:4001
--cluster-name=etcd --containerized=true --dns-suffix=internal.minimal.k8s.local --cluster-name=etcd --containerized=true --dns-suffix=.internal.minimal.example.com
--grpc-port=3996 --peer-urls=https://__name__:2380 --quarantine-client-urls=https://__name__:3994 --grpc-port=3996 --peer-urls=https://__name__:2380 --quarantine-client-urls=https://__name__:3994
--v=6 --volume-name-tag=kops.k8s.io/instance-group=master-fsn1 --volume-provider=hetzner --v=6 --volume-name-tag=kops.k8s.io/instance-group=master-fsn1 --volume-provider=hetzner
--volume-tag=kops.k8s.io/cluster=minimal.k8s.local --volume-tag=kops.k8s.io/volume-role=main --volume-tag=kops.k8s.io/cluster=minimal.example.com --volume-tag=kops.k8s.io/volume-role=main
> /tmp/pipe 2>&1 > /tmp/pipe 2>&1
env: env:
- name: HCLOUD_TOKEN - name: HCLOUD_TOKEN

View File

@ -6,7 +6,7 @@ spec:
addons: addons:
- id: k8s-1.16 - id: k8s-1.16
manifest: kops-controller.addons.k8s.io/k8s-1.16.yaml manifest: kops-controller.addons.k8s.io/k8s-1.16.yaml
manifestHash: 4f86e9d493848b3d4bb0d5f09b2a7a6975aa2ac637bb7d1388adf9bb7621f2d3 manifestHash: 70c5a1ff20acaea9d84940b827cae1e35538ac7a8f2b17f8d48f02a105963baa
name: kops-controller.addons.k8s.io name: kops-controller.addons.k8s.io
needsRollingUpdate: control-plane needsRollingUpdate: control-plane
selector: selector:
@ -14,7 +14,7 @@ spec:
version: 9.99.0 version: 9.99.0
- id: k8s-1.12 - id: k8s-1.12
manifest: coredns.addons.k8s.io/k8s-1.12.yaml manifest: coredns.addons.k8s.io/k8s-1.12.yaml
manifestHash: a38cdb6f83a2b6cb1a47136f5d2c137edfa366a4ccdc61e424949cd4a4ff518b manifestHash: 6a1db11adb764a3138401cf615c57780df760e7688d4d0d94bd434d6a6b9d370
name: coredns.addons.k8s.io name: coredns.addons.k8s.io
selector: selector:
k8s-addon: coredns.addons.k8s.io k8s-addon: coredns.addons.k8s.io
@ -39,16 +39,9 @@ spec:
selector: selector:
k8s-addon: limit-range.addons.k8s.io k8s-addon: limit-range.addons.k8s.io
version: 9.99.0 version: 9.99.0
- id: k8s-1.12
manifest: dns-controller.addons.k8s.io/k8s-1.12.yaml
manifestHash: a1f2591cd324732f2e63b6848b88378601533ce87d281cf07d83c134d71758ee
name: dns-controller.addons.k8s.io
selector:
k8s-addon: dns-controller.addons.k8s.io
version: 9.99.0
- id: k8s-1.22 - id: k8s-1.22
manifest: hcloud-cloud-controller.addons.k8s.io/k8s-1.22.yaml manifest: hcloud-cloud-controller.addons.k8s.io/k8s-1.22.yaml
manifestHash: 950b98db61e752f22afcb7226ca09ca1aad0696b6884325dfaf1b3e75f395594 manifestHash: 8f83c3847967c9e2946669e26758201efb04f8ed9ed4ecf2368446d3fc7c3866
name: hcloud-cloud-controller.addons.k8s.io name: hcloud-cloud-controller.addons.k8s.io
selector: selector:
k8s-addon: hcloud-cloud-controller.addons.k8s.io k8s-addon: hcloud-cloud-controller.addons.k8s.io

View File

@ -80,10 +80,6 @@ data:
fallthrough in-addr.arpa ip6.arpa fallthrough in-addr.arpa ip6.arpa
ttl 30 ttl 30
} }
hosts /rootfs/etc/hosts k8s.local {
ttl 30
fallthrough
}
prometheus :9153 prometheus :9153
forward . /etc/resolv.conf { forward . /etc/resolv.conf {
max_concurrent 1000 max_concurrent 1000
@ -184,9 +180,6 @@ spec:
- mountPath: /etc/coredns - mountPath: /etc/coredns
name: config-volume name: config-volume
readOnly: true readOnly: true
- mountPath: /rootfs/etc/hosts
name: etc-hosts
readOnly: true
dnsPolicy: Default dnsPolicy: Default
nodeSelector: nodeSelector:
kubernetes.io/os: linux kubernetes.io/os: linux
@ -212,10 +205,6 @@ spec:
- configMap: - configMap:
name: coredns name: coredns
name: config-volume name: config-volume
- hostPath:
path: /etc/hosts
type: File
name: etc-hosts
--- ---

View File

@ -9,7 +9,7 @@ metadata:
name: hcloud name: hcloud
namespace: kube-system namespace: kube-system
stringData: stringData:
network: minimal.k8s.local network: minimal.example.com
token: REDACTED token: REDACTED
--- ---

View File

@ -1,7 +1,7 @@
apiVersion: v1 apiVersion: v1
data: data:
config.yaml: | config.yaml: |
{"cloud":"hetzner","configBase":"memfs://tests/minimal.k8s.local","discovery":{"enabled":true}} {"cloud":"hetzner","configBase":"memfs://tests/minimal.example.com"}
kind: ConfigMap kind: ConfigMap
metadata: metadata:
creationTimestamp: null creationTimestamp: null
@ -136,14 +136,6 @@ rules:
- list - list
- watch - watch
- patch - patch
- apiGroups:
- ""
resources:
- endpoints
verbs:
- get
- list
- watch
--- ---
@ -210,16 +202,6 @@ rules:
- leases - leases
verbs: verbs:
- create - create
- apiGroups:
- ""
resourceNames:
- coredns
resources:
- configmaps
verbs:
- get
- watch
- patch
--- ---
@ -241,51 +223,3 @@ subjects:
- apiGroup: rbac.authorization.k8s.io - apiGroup: rbac.authorization.k8s.io
kind: User kind: User
name: system:serviceaccount:kube-system:kops-controller name: system:serviceaccount:kube-system:kops-controller
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
addon.kops.k8s.io/name: kops-controller.addons.k8s.io
app.kubernetes.io/managed-by: kops
discovery.kops.k8s.io/internal-name: api.internal.minimal.k8s.local
k8s-addon: kops-controller.addons.k8s.io
name: api-internal
namespace: kube-system
spec:
clusterIP: None
ports:
- name: https
port: 443
protocol: TCP
targetPort: 443
selector:
k8s-app: kops-controller
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
addon.kops.k8s.io/name: kops-controller.addons.k8s.io
app.kubernetes.io/managed-by: kops
discovery.kops.k8s.io/internal-name: kops-controller.internal.minimal.k8s.local
k8s-addon: kops-controller.addons.k8s.io
name: kops-controller-internal
namespace: kube-system
spec:
clusterIP: None
ports:
- name: https
port: 3988
protocol: TCP
targetPort: 3988
selector:
k8s-app: kops-controller
type: ClusterIP

View File

@ -1,141 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
addon.kops.k8s.io/name: dns-controller.addons.k8s.io
app.kubernetes.io/managed-by: kops
k8s-addon: dns-controller.addons.k8s.io
k8s-app: dns-controller
version: v1.26.0-alpha.1
name: dns-controller
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
k8s-app: dns-controller
strategy:
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
k8s-addon: dns-controller.addons.k8s.io
k8s-app: dns-controller
kops.k8s.io/managed-by: kops
version: v1.26.0-alpha.1
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
containers:
- args:
- --watch-ingress=false
- --dns=gossip
- --gossip-seed=127.0.0.1:3999
- --gossip-protocol-secondary=memberlist
- --gossip-listen-secondary=0.0.0.0:3993
- --gossip-seed-secondary=127.0.0.1:4000
- --internal-ipv4
- --zone=*/*
- -v=2
command: null
env:
- name: KUBERNETES_SERVICE_HOST
value: 127.0.0.1
image: registry.k8s.io/kops/dns-controller:1.26.0-alpha.1
name: dns-controller
resources:
requests:
cpu: 50m
memory: 50Mi
securityContext:
runAsNonRoot: true
dnsPolicy: Default
hostNetwork: true
nodeSelector: null
priorityClassName: system-cluster-critical
serviceAccount: dns-controller
tolerations:
- key: node.cloudprovider.kubernetes.io/uninitialized
operator: Exists
- key: node.kubernetes.io/not-ready
operator: Exists
- key: node-role.kubernetes.io/control-plane
operator: Exists
- key: node-role.kubernetes.io/master
operator: Exists
---
apiVersion: v1
kind: ServiceAccount
metadata:
creationTimestamp: null
labels:
addon.kops.k8s.io/name: dns-controller.addons.k8s.io
app.kubernetes.io/managed-by: kops
k8s-addon: dns-controller.addons.k8s.io
name: dns-controller
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
labels:
addon.kops.k8s.io/name: dns-controller.addons.k8s.io
app.kubernetes.io/managed-by: kops
k8s-addon: dns-controller.addons.k8s.io
name: kops:dns-controller
rules:
- apiGroups:
- ""
resources:
- endpoints
- services
- pods
- ingress
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
creationTimestamp: null
labels:
addon.kops.k8s.io/name: dns-controller.addons.k8s.io
app.kubernetes.io/managed-by: kops
k8s-addon: dns-controller.addons.k8s.io
name: kops:dns-controller
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kops:dns-controller
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: system:serviceaccount:kube-system:dns-controller

View File

@ -37,8 +37,8 @@ APIServerConfig:
requestheaderUsernameHeaders: requestheaderUsernameHeaders:
- X-Remote-User - X-Remote-User
securePort: 443 securePort: 443
serviceAccountIssuer: https://api.internal.minimal.k8s.local serviceAccountIssuer: https://api.internal.minimal.example.com
serviceAccountJWKSURI: https://api.internal.minimal.k8s.local/openid/v1/jwks serviceAccountJWKSURI: https://api.internal.minimal.example.com/openid/v1/jwks
serviceClusterIPRange: 100.64.0.0/13 serviceClusterIPRange: 100.64.0.0/13
storageBackend: etcd3 storageBackend: etcd3
ServiceAccountPublicKeys: | ServiceAccountPublicKeys: |
@ -219,7 +219,7 @@ CAs:
MA0GCSqGSIb3DQEBCwUAA0EAVQVx5MUtuAIeePuP9o51xtpT2S6Fvfi8J4ICxnlA MA0GCSqGSIb3DQEBCwUAA0EAVQVx5MUtuAIeePuP9o51xtpT2S6Fvfi8J4ICxnlA
9B7UD2ushcVFPtaeoL9Gfu8aY4KJBeqqg5ojl4qmRnThjw== 9B7UD2ushcVFPtaeoL9Gfu8aY4KJBeqqg5ojl4qmRnThjw==
-----END CERTIFICATE----- -----END CERTIFICATE-----
ClusterName: minimal.k8s.local ClusterName: minimal.example.com
FileAssets: FileAssets:
- content: | - content: |
apiVersion: kubescheduler.config.k8s.io/v1beta2 apiVersion: kubescheduler.config.k8s.io/v1beta2
@ -264,15 +264,15 @@ KubeletConfig:
- node-role.kubernetes.io/control-plane=:NoSchedule - node-role.kubernetes.io/control-plane=:NoSchedule
UpdatePolicy: automatic UpdatePolicy: automatic
channels: channels:
- memfs://tests/minimal.k8s.local/addons/bootstrap-channel.yaml - memfs://tests/minimal.example.com/addons/bootstrap-channel.yaml
containerdConfig: containerdConfig:
logLevel: info logLevel: info
runc: runc:
version: 1.1.4 version: 1.1.4
version: 1.6.9 version: 1.6.9
etcdManifests: etcdManifests:
- memfs://tests/minimal.k8s.local/manifests/etcd/main-master-fsn1.yaml - memfs://tests/minimal.example.com/manifests/etcd/main-master-fsn1.yaml
- memfs://tests/minimal.k8s.local/manifests/etcd/events-master-fsn1.yaml - memfs://tests/minimal.example.com/manifests/etcd/events-master-fsn1.yaml
staticManifests: staticManifests:
- key: kube-apiserver-healthcheck - key: kube-apiserver-healthcheck
path: manifests/static/kube-apiserver-healthcheck.yaml path: manifests/static/kube-apiserver-healthcheck.yaml

View File

@ -5,16 +5,12 @@ Assets:
- 962100bbc4baeaaa5748cdbfce941f756b1531c2eadb290129401498bfac21e7@https://storage.googleapis.com/k8s-artifacts-cni/release/v0.9.1/cni-plugins-linux-amd64-v0.9.1.tgz - 962100bbc4baeaaa5748cdbfce941f756b1531c2eadb290129401498bfac21e7@https://storage.googleapis.com/k8s-artifacts-cni/release/v0.9.1/cni-plugins-linux-amd64-v0.9.1.tgz
- 9ee2644bfb95b23123f96b564df2035ec94a46f64060ae12322e09a8ec3c2b53@https://github.com/containerd/containerd/releases/download/v1.6.9/containerd-1.6.9-linux-amd64.tar.gz - 9ee2644bfb95b23123f96b564df2035ec94a46f64060ae12322e09a8ec3c2b53@https://github.com/containerd/containerd/releases/download/v1.6.9/containerd-1.6.9-linux-amd64.tar.gz
- db772be63147a4e747b4fe286c7c16a2edc4a8458bd3092ea46aaee77750e8ce@https://github.com/opencontainers/runc/releases/download/v1.1.4/runc.amd64 - db772be63147a4e747b4fe286c7c16a2edc4a8458bd3092ea46aaee77750e8ce@https://github.com/opencontainers/runc/releases/download/v1.1.4/runc.amd64
- f90ed6dcef534e6d1ae17907dc7eb40614b8945ad4af7f0e98d2be7cde8165c6@https://artifacts.k8s.io/binaries/kops/1.21.0-alpha.1/linux/amd64/protokube,https://github.com/kubernetes/kops/releases/download/v1.21.0-alpha.1/protokube-linux-amd64
- 9992e7eb2a2e93f799e5a9e98eb718637433524bc65f630357201a79f49b13d0@https://artifacts.k8s.io/binaries/kops/1.21.0-alpha.1/linux/amd64/channels,https://github.com/kubernetes/kops/releases/download/v1.21.0-alpha.1/channels-linux-amd64
arm64: arm64:
- 69572a7b3d179d4a479aa2e0f90e2f091d8d84ef33a35422fc89975dc137a590@https://storage.googleapis.com/kubernetes-release/release/v1.25.0/bin/linux/arm64/kubelet - 69572a7b3d179d4a479aa2e0f90e2f091d8d84ef33a35422fc89975dc137a590@https://storage.googleapis.com/kubernetes-release/release/v1.25.0/bin/linux/arm64/kubelet
- 24db547bbae294c5c44f2b4a777e45f0e2f3d6295eace0d0c4be2b2dfa45330d@https://storage.googleapis.com/kubernetes-release/release/v1.25.0/bin/linux/arm64/kubectl - 24db547bbae294c5c44f2b4a777e45f0e2f3d6295eace0d0c4be2b2dfa45330d@https://storage.googleapis.com/kubernetes-release/release/v1.25.0/bin/linux/arm64/kubectl
- ef17764ffd6cdcb16d76401bac1db6acc050c9b088f1be5efa0e094ea3b01df0@https://storage.googleapis.com/k8s-artifacts-cni/release/v0.9.1/cni-plugins-linux-arm64-v0.9.1.tgz - ef17764ffd6cdcb16d76401bac1db6acc050c9b088f1be5efa0e094ea3b01df0@https://storage.googleapis.com/k8s-artifacts-cni/release/v0.9.1/cni-plugins-linux-arm64-v0.9.1.tgz
- 140197aee930a8bd8a69ff8e0161e56305751be66e899dccd833c27d139f4f47@https://github.com/containerd/containerd/releases/download/v1.6.9/containerd-1.6.9-linux-arm64.tar.gz - 140197aee930a8bd8a69ff8e0161e56305751be66e899dccd833c27d139f4f47@https://github.com/containerd/containerd/releases/download/v1.6.9/containerd-1.6.9-linux-arm64.tar.gz
- dbb71e737eaef454a406ce21fd021bd8f1b35afb7635016745992bbd7c17a223@https://github.com/opencontainers/runc/releases/download/v1.1.4/runc.arm64 - dbb71e737eaef454a406ce21fd021bd8f1b35afb7635016745992bbd7c17a223@https://github.com/opencontainers/runc/releases/download/v1.1.4/runc.arm64
- 2f599c3d54f4c4bdbcc95aaf0c7b513a845d8f9503ec5b34c9f86aa1bc34fc0c@https://artifacts.k8s.io/binaries/kops/1.21.0-alpha.1/linux/arm64/protokube,https://github.com/kubernetes/kops/releases/download/v1.21.0-alpha.1/protokube-linux-arm64
- 9d842e3636a95de2315cdea2be7a282355aac0658ef0b86d5dc2449066538f13@https://artifacts.k8s.io/binaries/kops/1.21.0-alpha.1/linux/arm64/channels,https://github.com/kubernetes/kops/releases/download/v1.21.0-alpha.1/channels-linux-arm64
CAs: CAs:
kubernetes-ca: | kubernetes-ca: |
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
@ -37,7 +33,7 @@ CAs:
MA0GCSqGSIb3DQEBCwUAA0EAVQVx5MUtuAIeePuP9o51xtpT2S6Fvfi8J4ICxnlA MA0GCSqGSIb3DQEBCwUAA0EAVQVx5MUtuAIeePuP9o51xtpT2S6Fvfi8J4ICxnlA
9B7UD2ushcVFPtaeoL9Gfu8aY4KJBeqqg5ojl4qmRnThjw== 9B7UD2ushcVFPtaeoL9Gfu8aY4KJBeqqg5ojl4qmRnThjw==
-----END CERTIFICATE----- -----END CERTIFICATE-----
ClusterName: minimal.k8s.local ClusterName: minimal.example.com
Hooks: Hooks:
- null - null
- null - null
@ -66,7 +62,7 @@ KubeletConfig:
shutdownGracePeriodCriticalPods: 10s shutdownGracePeriodCriticalPods: 10s
UpdatePolicy: automatic UpdatePolicy: automatic
channels: channels:
- memfs://tests/minimal.k8s.local/addons/bootstrap-channel.yaml - memfs://tests/minimal.example.com/addons/bootstrap-channel.yaml
containerdConfig: containerdConfig:
logLevel: info logLevel: info
runc: runc:

View File

@ -181,8 +181,8 @@ kubeAPIServer:
requestheaderUsernameHeaders: requestheaderUsernameHeaders:
- X-Remote-User - X-Remote-User
securePort: 443 securePort: 443
serviceAccountIssuer: https://api.internal.minimal.k8s.local serviceAccountIssuer: https://api.internal.minimal.example.com
serviceAccountJWKSURI: https://api.internal.minimal.k8s.local/openid/v1/jwks serviceAccountJWKSURI: https://api.internal.minimal.example.com/openid/v1/jwks
serviceClusterIPRange: 100.64.0.0/13 serviceClusterIPRange: 100.64.0.0/13
storageBackend: etcd3 storageBackend: etcd3
kubeControllerManager: kubeControllerManager:
@ -190,7 +190,7 @@ kubeControllerManager:
attachDetachReconcileSyncPeriod: 1m0s attachDetachReconcileSyncPeriod: 1m0s
cloudProvider: external cloudProvider: external
clusterCIDR: 100.96.0.0/11 clusterCIDR: 100.96.0.0/11
clusterName: minimal.k8s.local clusterName: minimal.example.com
configureCloudRoutes: false configureCloudRoutes: false
image: registry.k8s.io/kube-controller-manager:v1.25.0 image: registry.k8s.io/kube-controller-manager:v1.25.0
leaderElection: leaderElection:
@ -246,10 +246,10 @@ __EOF_CLUSTER_SPEC
cat > conf/kube_env.yaml << '__EOF_KUBE_ENV' cat > conf/kube_env.yaml << '__EOF_KUBE_ENV'
CloudProvider: hetzner CloudProvider: hetzner
ConfigBase: memfs://tests/minimal.k8s.local ConfigBase: memfs://tests/minimal.example.com
InstanceGroupName: master-fsn1 InstanceGroupName: master-fsn1
InstanceGroupRole: Master InstanceGroupRole: Master
NodeupConfigHash: 1tDhVHjdqDjbxWBtM4GROvB72iZ+xB6vYDKe6EM9pAc= NodeupConfigHash: pPDt88eh2jsyngQx8UCDaeyJfdF1xae0mtsI3ivB720=
__EOF_KUBE_ENV __EOF_KUBE_ENV

View File

@ -8,7 +8,6 @@ NODEUP_HASH_AMD64=585fbda0f0a43184656b4bfc0cc5f0c0b85612faf43b8816acca1f99d422c9
NODEUP_URL_ARM64=https://artifacts.k8s.io/binaries/kops/1.21.0-alpha.1/linux/arm64/nodeup,https://github.com/kubernetes/kops/releases/download/v1.21.0-alpha.1/nodeup-linux-arm64 NODEUP_URL_ARM64=https://artifacts.k8s.io/binaries/kops/1.21.0-alpha.1/linux/arm64/nodeup,https://github.com/kubernetes/kops/releases/download/v1.21.0-alpha.1/nodeup-linux-arm64
NODEUP_HASH_ARM64=7603675379699105a9b9915ff97718ea99b1bbb01a4c184e2f827c8a96e8e865 NODEUP_HASH_ARM64=7603675379699105a9b9915ff97718ea99b1bbb01a4c184e2f827c8a96e8e865
export HCLOUD_TOKEN=REDACTED
@ -160,10 +159,10 @@ __EOF_CLUSTER_SPEC
cat > conf/kube_env.yaml << '__EOF_KUBE_ENV' cat > conf/kube_env.yaml << '__EOF_KUBE_ENV'
CloudProvider: hetzner CloudProvider: hetzner
ConfigBase: memfs://tests/minimal.k8s.local ConfigBase: memfs://tests/minimal.example.com
InstanceGroupName: nodes-fsn1 InstanceGroupName: nodes-fsn1
InstanceGroupRole: Node InstanceGroupRole: Node
NodeupConfigHash: eGEJwCWIaUvGEKFOh+yUoHcReInMlufyGjtiudZU8V8= NodeupConfigHash: PWu9ALIVbND2iz1ciF+yjlTyJJFqCSux2yGwXKoPjUw=
__EOF_KUBE_ENV __EOF_KUBE_ENV

View File

@ -2,7 +2,7 @@ apiVersion: kops.k8s.io/v1alpha2
kind: Cluster kind: Cluster
metadata: metadata:
creationTimestamp: "2017-01-01T00:00:00Z" creationTimestamp: "2017-01-01T00:00:00Z"
name: minimal.k8s.local name: minimal.example.com
spec: spec:
api: api:
loadBalancer: loadBalancer:
@ -11,7 +11,7 @@ spec:
rbac: {} rbac: {}
channel: stable channel: stable
cloudProvider: hetzner cloudProvider: hetzner
configBase: memfs://tests/minimal.k8s.local configBase: memfs://tests/minimal.example.com
etcdClusters: etcdClusters:
- cpuRequest: 200m - cpuRequest: 200m
etcdMembers: etcdMembers:
@ -34,7 +34,6 @@ spec:
- 0.0.0.0/0 - 0.0.0.0/0
- ::/0 - ::/0
kubernetesVersion: v1.25.0 kubernetesVersion: v1.25.0
masterPublicName: api.minimal.k8s.local
networkCIDR: 10.0.0.0/16 networkCIDR: 10.0.0.0/16
networking: networking:
cni: {} cni: {}
@ -48,7 +47,7 @@ spec:
zone: fsn1 zone: fsn1
topology: topology:
dns: dns:
type: Public type: None
masters: public masters: public
nodes: public nodes: public
@ -59,7 +58,7 @@ kind: InstanceGroup
metadata: metadata:
creationTimestamp: "2017-01-01T00:00:00Z" creationTimestamp: "2017-01-01T00:00:00Z"
labels: labels:
kops.k8s.io/cluster: minimal.k8s.local kops.k8s.io/cluster: minimal.example.com
name: master-fsn1 name: master-fsn1
spec: spec:
image: ubuntu-20.04 image: ubuntu-20.04
@ -77,7 +76,7 @@ kind: InstanceGroup
metadata: metadata:
creationTimestamp: "2017-01-01T00:00:00Z" creationTimestamp: "2017-01-01T00:00:00Z"
labels: labels:
kops.k8s.io/cluster: minimal.k8s.local kops.k8s.io/cluster: minimal.example.com
name: nodes-fsn1 name: nodes-fsn1
spec: spec:
image: ubuntu-20.04 image: ubuntu-20.04

View File

@ -1,10 +1,10 @@
locals { locals {
cluster_name = "minimal.k8s.local" cluster_name = "minimal.example.com"
region = "eu-central" region = "eu-central"
} }
output "cluster_name" { output "cluster_name" {
value = "minimal.k8s.local" value = "minimal.example.com"
} }
output "region" { output "region" {
@ -22,7 +22,7 @@ provider "aws" {
resource "aws_s3_object" "cluster-completed-spec" { resource "aws_s3_object" "cluster-completed-spec" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_cluster-completed.spec_content") content = file("${path.module}/data/aws_s3_object_cluster-completed.spec_content")
key = "tests/minimal.k8s.local/cluster-completed.spec" key = "tests/minimal.example.com/cluster-completed.spec"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
@ -30,7 +30,7 @@ resource "aws_s3_object" "cluster-completed-spec" {
resource "aws_s3_object" "etcd-cluster-spec-events" { resource "aws_s3_object" "etcd-cluster-spec-events" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_etcd-cluster-spec-events_content") content = file("${path.module}/data/aws_s3_object_etcd-cluster-spec-events_content")
key = "tests/minimal.k8s.local/backups/etcd/events/control/etcd-cluster-spec" key = "tests/minimal.example.com/backups/etcd/events/control/etcd-cluster-spec"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
@ -38,7 +38,7 @@ resource "aws_s3_object" "etcd-cluster-spec-events" {
resource "aws_s3_object" "etcd-cluster-spec-main" { resource "aws_s3_object" "etcd-cluster-spec-main" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_etcd-cluster-spec-main_content") content = file("${path.module}/data/aws_s3_object_etcd-cluster-spec-main_content")
key = "tests/minimal.k8s.local/backups/etcd/main/control/etcd-cluster-spec" key = "tests/minimal.example.com/backups/etcd/main/control/etcd-cluster-spec"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
@ -46,7 +46,7 @@ resource "aws_s3_object" "etcd-cluster-spec-main" {
resource "aws_s3_object" "kops-version-txt" { resource "aws_s3_object" "kops-version-txt" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_kops-version.txt_content") content = file("${path.module}/data/aws_s3_object_kops-version.txt_content")
key = "tests/minimal.k8s.local/kops-version.txt" key = "tests/minimal.example.com/kops-version.txt"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
@ -54,7 +54,7 @@ resource "aws_s3_object" "kops-version-txt" {
resource "aws_s3_object" "manifests-etcdmanager-events-master-fsn1" { resource "aws_s3_object" "manifests-etcdmanager-events-master-fsn1" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_manifests-etcdmanager-events-master-fsn1_content") content = file("${path.module}/data/aws_s3_object_manifests-etcdmanager-events-master-fsn1_content")
key = "tests/minimal.k8s.local/manifests/etcd/events-master-fsn1.yaml" key = "tests/minimal.example.com/manifests/etcd/events-master-fsn1.yaml"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
@ -62,7 +62,7 @@ resource "aws_s3_object" "manifests-etcdmanager-events-master-fsn1" {
resource "aws_s3_object" "manifests-etcdmanager-main-master-fsn1" { resource "aws_s3_object" "manifests-etcdmanager-main-master-fsn1" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_manifests-etcdmanager-main-master-fsn1_content") content = file("${path.module}/data/aws_s3_object_manifests-etcdmanager-main-master-fsn1_content")
key = "tests/minimal.k8s.local/manifests/etcd/main-master-fsn1.yaml" key = "tests/minimal.example.com/manifests/etcd/main-master-fsn1.yaml"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
@ -70,79 +70,71 @@ resource "aws_s3_object" "manifests-etcdmanager-main-master-fsn1" {
resource "aws_s3_object" "manifests-static-kube-apiserver-healthcheck" { resource "aws_s3_object" "manifests-static-kube-apiserver-healthcheck" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_manifests-static-kube-apiserver-healthcheck_content") content = file("${path.module}/data/aws_s3_object_manifests-static-kube-apiserver-healthcheck_content")
key = "tests/minimal.k8s.local/manifests/static/kube-apiserver-healthcheck.yaml" key = "tests/minimal.example.com/manifests/static/kube-apiserver-healthcheck.yaml"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
resource "aws_s3_object" "minimal-k8s-local-addons-bootstrap" { resource "aws_s3_object" "minimal-example-com-addons-bootstrap" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_minimal.k8s.local-addons-bootstrap_content") content = file("${path.module}/data/aws_s3_object_minimal.example.com-addons-bootstrap_content")
key = "tests/minimal.k8s.local/addons/bootstrap-channel.yaml" key = "tests/minimal.example.com/addons/bootstrap-channel.yaml"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
resource "aws_s3_object" "minimal-k8s-local-addons-coredns-addons-k8s-io-k8s-1-12" { resource "aws_s3_object" "minimal-example-com-addons-coredns-addons-k8s-io-k8s-1-12" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_minimal.k8s.local-addons-coredns.addons.k8s.io-k8s-1.12_content") content = file("${path.module}/data/aws_s3_object_minimal.example.com-addons-coredns.addons.k8s.io-k8s-1.12_content")
key = "tests/minimal.k8s.local/addons/coredns.addons.k8s.io/k8s-1.12.yaml" key = "tests/minimal.example.com/addons/coredns.addons.k8s.io/k8s-1.12.yaml"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
resource "aws_s3_object" "minimal-k8s-local-addons-dns-controller-addons-k8s-io-k8s-1-12" { resource "aws_s3_object" "minimal-example-com-addons-hcloud-cloud-controller-addons-k8s-io-k8s-1-22" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_minimal.k8s.local-addons-dns-controller.addons.k8s.io-k8s-1.12_content") content = file("${path.module}/data/aws_s3_object_minimal.example.com-addons-hcloud-cloud-controller.addons.k8s.io-k8s-1.22_content")
key = "tests/minimal.k8s.local/addons/dns-controller.addons.k8s.io/k8s-1.12.yaml" key = "tests/minimal.example.com/addons/hcloud-cloud-controller.addons.k8s.io/k8s-1.22.yaml"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
resource "aws_s3_object" "minimal-k8s-local-addons-hcloud-cloud-controller-addons-k8s-io-k8s-1-22" { resource "aws_s3_object" "minimal-example-com-addons-hcloud-csi-driver-addons-k8s-io-k8s-1-22" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_minimal.k8s.local-addons-hcloud-cloud-controller.addons.k8s.io-k8s-1.22_content") content = file("${path.module}/data/aws_s3_object_minimal.example.com-addons-hcloud-csi-driver.addons.k8s.io-k8s-1.22_content")
key = "tests/minimal.k8s.local/addons/hcloud-cloud-controller.addons.k8s.io/k8s-1.22.yaml" key = "tests/minimal.example.com/addons/hcloud-csi-driver.addons.k8s.io/k8s-1.22.yaml"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
resource "aws_s3_object" "minimal-k8s-local-addons-hcloud-csi-driver-addons-k8s-io-k8s-1-22" { resource "aws_s3_object" "minimal-example-com-addons-kops-controller-addons-k8s-io-k8s-1-16" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_minimal.k8s.local-addons-hcloud-csi-driver.addons.k8s.io-k8s-1.22_content") content = file("${path.module}/data/aws_s3_object_minimal.example.com-addons-kops-controller.addons.k8s.io-k8s-1.16_content")
key = "tests/minimal.k8s.local/addons/hcloud-csi-driver.addons.k8s.io/k8s-1.22.yaml" key = "tests/minimal.example.com/addons/kops-controller.addons.k8s.io/k8s-1.16.yaml"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
resource "aws_s3_object" "minimal-k8s-local-addons-kops-controller-addons-k8s-io-k8s-1-16" { resource "aws_s3_object" "minimal-example-com-addons-kubelet-api-rbac-addons-k8s-io-k8s-1-9" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_minimal.k8s.local-addons-kops-controller.addons.k8s.io-k8s-1.16_content") content = file("${path.module}/data/aws_s3_object_minimal.example.com-addons-kubelet-api.rbac.addons.k8s.io-k8s-1.9_content")
key = "tests/minimal.k8s.local/addons/kops-controller.addons.k8s.io/k8s-1.16.yaml" key = "tests/minimal.example.com/addons/kubelet-api.rbac.addons.k8s.io/k8s-1.9.yaml"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
resource "aws_s3_object" "minimal-k8s-local-addons-kubelet-api-rbac-addons-k8s-io-k8s-1-9" { resource "aws_s3_object" "minimal-example-com-addons-limit-range-addons-k8s-io" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_minimal.k8s.local-addons-kubelet-api.rbac.addons.k8s.io-k8s-1.9_content") content = file("${path.module}/data/aws_s3_object_minimal.example.com-addons-limit-range.addons.k8s.io_content")
key = "tests/minimal.k8s.local/addons/kubelet-api.rbac.addons.k8s.io/k8s-1.9.yaml" key = "tests/minimal.example.com/addons/limit-range.addons.k8s.io/v1.5.0.yaml"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
resource "aws_s3_object" "minimal-k8s-local-addons-limit-range-addons-k8s-io" { resource "aws_s3_object" "minimal-example-com-addons-rbac-addons-k8s-io-k8s-1-8" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_minimal.k8s.local-addons-limit-range.addons.k8s.io_content") content = file("${path.module}/data/aws_s3_object_minimal.example.com-addons-rbac.addons.k8s.io-k8s-1.8_content")
key = "tests/minimal.k8s.local/addons/limit-range.addons.k8s.io/v1.5.0.yaml" key = "tests/minimal.example.com/addons/rbac.addons.k8s.io/k8s-1.8.yaml"
provider = aws.files
server_side_encryption = "AES256"
}
resource "aws_s3_object" "minimal-k8s-local-addons-rbac-addons-k8s-io-k8s-1-8" {
bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_minimal.k8s.local-addons-rbac.addons.k8s.io-k8s-1.8_content")
key = "tests/minimal.k8s.local/addons/rbac.addons.k8s.io/k8s-1.8.yaml"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
@ -150,7 +142,7 @@ resource "aws_s3_object" "minimal-k8s-local-addons-rbac-addons-k8s-io-k8s-1-8" {
resource "aws_s3_object" "nodeupconfig-master-fsn1" { resource "aws_s3_object" "nodeupconfig-master-fsn1" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_nodeupconfig-master-fsn1_content") content = file("${path.module}/data/aws_s3_object_nodeupconfig-master-fsn1_content")
key = "tests/minimal.k8s.local/igconfig/master/master-fsn1/nodeupconfig.yaml" key = "tests/minimal.example.com/igconfig/master/master-fsn1/nodeupconfig.yaml"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
@ -158,20 +150,20 @@ resource "aws_s3_object" "nodeupconfig-master-fsn1" {
resource "aws_s3_object" "nodeupconfig-nodes-fsn1" { resource "aws_s3_object" "nodeupconfig-nodes-fsn1" {
bucket = "testingBucket" bucket = "testingBucket"
content = file("${path.module}/data/aws_s3_object_nodeupconfig-nodes-fsn1_content") content = file("${path.module}/data/aws_s3_object_nodeupconfig-nodes-fsn1_content")
key = "tests/minimal.k8s.local/igconfig/node/nodes-fsn1/nodeupconfig.yaml" key = "tests/minimal.example.com/igconfig/node/nodes-fsn1/nodeupconfig.yaml"
provider = aws.files provider = aws.files
server_side_encryption = "AES256" server_side_encryption = "AES256"
} }
resource "hcloud_firewall" "control-plane-minimal-k8s-local" { resource "hcloud_firewall" "control-plane-minimal-example-com" {
apply_to { apply_to {
label_selector = "kops.k8s.io/cluster=minimal.k8s.local,kops.k8s.io/instance-role=Master" label_selector = "kops.k8s.io/cluster=minimal.example.com,kops.k8s.io/instance-role=Master"
} }
labels = { labels = {
"kops.k8s.io/cluster" = "minimal.k8s.local" "kops.k8s.io/cluster" = "minimal.example.com"
"kops.k8s.io/firewall-role" = "control-plane" "kops.k8s.io/firewall-role" = "control-plane"
} }
name = "control-plane.minimal.k8s.local" name = "control-plane.minimal.example.com"
rule { rule {
direction = "in" direction = "in"
port = "22" port = "22"
@ -180,15 +172,15 @@ resource "hcloud_firewall" "control-plane-minimal-k8s-local" {
} }
} }
resource "hcloud_firewall" "nodes-minimal-k8s-local" { resource "hcloud_firewall" "nodes-minimal-example-com" {
apply_to { apply_to {
label_selector = "kops.k8s.io/cluster=minimal.k8s.local,kops.k8s.io/instance-role=Node" label_selector = "kops.k8s.io/cluster=minimal.example.com,kops.k8s.io/instance-role=Node"
} }
labels = { labels = {
"kops.k8s.io/cluster" = "minimal.k8s.local" "kops.k8s.io/cluster" = "minimal.example.com"
"kops.k8s.io/firewall-role" = "nodes" "kops.k8s.io/firewall-role" = "nodes"
} }
name = "nodes.minimal.k8s.local" name = "nodes.minimal.example.com"
rule { rule {
direction = "in" direction = "in"
port = "22" port = "22"
@ -197,45 +189,45 @@ resource "hcloud_firewall" "nodes-minimal-k8s-local" {
} }
} }
resource "hcloud_load_balancer" "api-minimal-k8s-local" { resource "hcloud_load_balancer" "api-minimal-example-com" {
labels = { labels = {
"kops.k8s.io/cluster" = "minimal.k8s.local" "kops.k8s.io/cluster" = "minimal.example.com"
} }
load_balancer_type = "lb11" load_balancer_type = "lb11"
location = "fsn1" location = "fsn1"
name = "api.minimal.k8s.local" name = "api.minimal.example.com"
} }
resource "hcloud_load_balancer_network" "api-minimal-k8s-local" { resource "hcloud_load_balancer_network" "api-minimal-example-com" {
load_balancer_id = hcloud_load_balancer.api-minimal-k8s-local.id load_balancer_id = hcloud_load_balancer.api-minimal-example-com.id
network_id = hcloud_network.minimal-k8s-local.id network_id = hcloud_network.minimal-example-com.id
} }
resource "hcloud_load_balancer_service" "api-minimal-k8s-local" { resource "hcloud_load_balancer_service" "api-minimal-example-com" {
destination_port = 443 destination_port = 443
listen_port = 443 listen_port = 443
load_balancer_id = hcloud_load_balancer.api-minimal-k8s-local.id load_balancer_id = hcloud_load_balancer.api-minimal-example-com.id
protocol = "tcp" protocol = "tcp"
} }
resource "hcloud_load_balancer_target" "api-minimal-k8s-local" { resource "hcloud_load_balancer_target" "api-minimal-example-com" {
label_selector = "kops.k8s.io/cluster=minimal.k8s.local,kops.k8s.io/instance-role=Master" label_selector = "kops.k8s.io/cluster=minimal.example.com,kops.k8s.io/instance-role=Master"
load_balancer_id = hcloud_load_balancer.api-minimal-k8s-local.id load_balancer_id = hcloud_load_balancer.api-minimal-example-com.id
type = "label_selector" type = "label_selector"
use_private_ip = true use_private_ip = true
} }
resource "hcloud_network" "minimal-k8s-local" { resource "hcloud_network" "minimal-example-com" {
ip_range = "10.0.0.0/16" ip_range = "10.0.0.0/16"
labels = { labels = {
"kops.k8s.io/cluster" = "minimal.k8s.local" "kops.k8s.io/cluster" = "minimal.example.com"
} }
name = "minimal.k8s.local" name = "minimal.example.com"
} }
resource "hcloud_network_subnet" "minimal-k8s-local-10-0-0-0--16" { resource "hcloud_network_subnet" "minimal-example-com-10-0-0-0--16" {
ip_range = "10.0.0.0/16" ip_range = "10.0.0.0/16"
network_id = hcloud_network.minimal-k8s-local.id network_id = hcloud_network.minimal-example-com.id
network_zone = "eu-central" network_zone = "eu-central"
type = "cloud" type = "cloud"
} }
@ -244,21 +236,21 @@ resource "hcloud_server" "master-fsn1" {
count = 1 count = 1
image = "ubuntu-20.04" image = "ubuntu-20.04"
labels = { labels = {
"kops.k8s.io/cluster" = "minimal.k8s.local" "kops.k8s.io/cluster" = "minimal.example.com"
"kops.k8s.io/instance-group" = "master-fsn1" "kops.k8s.io/instance-group" = "master-fsn1"
"kops.k8s.io/instance-role" = "Master" "kops.k8s.io/instance-role" = "Master"
} }
location = "fsn1" location = "fsn1"
name = "master-fsn1-${count.index}" name = "master-fsn1-${count.index}"
network { network {
network_id = hcloud_network.minimal-k8s-local.id network_id = hcloud_network.minimal-example-com.id
} }
public_net { public_net {
ipv4_enabled = true ipv4_enabled = true
ipv6_enabled = false ipv6_enabled = false
} }
server_type = "cx21" server_type = "cx21"
ssh_keys = [hcloud_ssh_key.minimal-k8s-local-c4_a6_ed_9a_a8_89_b9_e2_c3_9c_d6_63_eb_9c_71_57.id] ssh_keys = [hcloud_ssh_key.minimal-example-com-c4_a6_ed_9a_a8_89_b9_e2_c3_9c_d6_63_eb_9c_71_57.id]
user_data = filebase64("${path.module}/data/hcloud_server_master-fsn1_user_data") user_data = filebase64("${path.module}/data/hcloud_server_master-fsn1_user_data")
} }
@ -266,51 +258,51 @@ resource "hcloud_server" "nodes-fsn1" {
count = 1 count = 1
image = "ubuntu-20.04" image = "ubuntu-20.04"
labels = { labels = {
"kops.k8s.io/cluster" = "minimal.k8s.local" "kops.k8s.io/cluster" = "minimal.example.com"
"kops.k8s.io/instance-group" = "nodes-fsn1" "kops.k8s.io/instance-group" = "nodes-fsn1"
"kops.k8s.io/instance-role" = "Node" "kops.k8s.io/instance-role" = "Node"
} }
location = "fsn1" location = "fsn1"
name = "nodes-fsn1-${count.index}" name = "nodes-fsn1-${count.index}"
network { network {
network_id = hcloud_network.minimal-k8s-local.id network_id = hcloud_network.minimal-example-com.id
} }
public_net { public_net {
ipv4_enabled = true ipv4_enabled = true
ipv6_enabled = false ipv6_enabled = false
} }
server_type = "cx21" server_type = "cx21"
ssh_keys = [hcloud_ssh_key.minimal-k8s-local-c4_a6_ed_9a_a8_89_b9_e2_c3_9c_d6_63_eb_9c_71_57.id] ssh_keys = [hcloud_ssh_key.minimal-example-com-c4_a6_ed_9a_a8_89_b9_e2_c3_9c_d6_63_eb_9c_71_57.id]
user_data = filebase64("${path.module}/data/hcloud_server_nodes-fsn1_user_data") user_data = filebase64("${path.module}/data/hcloud_server_nodes-fsn1_user_data")
} }
resource "hcloud_ssh_key" "minimal-k8s-local-c4_a6_ed_9a_a8_89_b9_e2_c3_9c_d6_63_eb_9c_71_57" { resource "hcloud_ssh_key" "minimal-example-com-c4_a6_ed_9a_a8_89_b9_e2_c3_9c_d6_63_eb_9c_71_57" {
labels = { labels = {
"kops.k8s.io/cluster" = "minimal.k8s.local" "kops.k8s.io/cluster" = "minimal.example.com"
} }
name = "minimal.k8s.local-c4:a6:ed:9a:a8:89:b9:e2:c3:9c:d6:63:eb:9c:71:57" name = "minimal.example.com-c4:a6:ed:9a:a8:89:b9:e2:c3:9c:d6:63:eb:9c:71:57"
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCtWu40XQo8dczLsCq0OWV+hxm9uV3WxeH9Kgh4sMzQxNtoU1pvW0XdjpkBesRKGoolfWeCLXWxpyQb1IaiMkKoz7MdhQ/6UKjMjP66aFWWp3pwD0uj0HuJ7tq4gKHKRYGTaZIRWpzUiANBrjugVgA+Sd7E/mYwc/DMXkIyRZbvhQ==" public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCtWu40XQo8dczLsCq0OWV+hxm9uV3WxeH9Kgh4sMzQxNtoU1pvW0XdjpkBesRKGoolfWeCLXWxpyQb1IaiMkKoz7MdhQ/6UKjMjP66aFWWp3pwD0uj0HuJ7tq4gKHKRYGTaZIRWpzUiANBrjugVgA+Sd7E/mYwc/DMXkIyRZbvhQ=="
} }
resource "hcloud_volume" "etcd-1-etcd-events-minimal-k8s-local" { resource "hcloud_volume" "etcd-1-etcd-events-minimal-example-com" {
labels = { labels = {
"kops.k8s.io/cluster" = "minimal.k8s.local" "kops.k8s.io/cluster" = "minimal.example.com"
"kops.k8s.io/instance-group" = "master-fsn1" "kops.k8s.io/instance-group" = "master-fsn1"
"kops.k8s.io/volume-role" = "events" "kops.k8s.io/volume-role" = "events"
} }
location = "fsn1" location = "fsn1"
name = "etcd-1.etcd-events.minimal.k8s.local" name = "etcd-1.etcd-events.minimal.example.com"
size = 20 size = 20
} }
resource "hcloud_volume" "etcd-1-etcd-main-minimal-k8s-local" { resource "hcloud_volume" "etcd-1-etcd-main-minimal-example-com" {
labels = { labels = {
"kops.k8s.io/cluster" = "minimal.k8s.local" "kops.k8s.io/cluster" = "minimal.example.com"
"kops.k8s.io/instance-group" = "master-fsn1" "kops.k8s.io/instance-group" = "master-fsn1"
"kops.k8s.io/volume-role" = "main" "kops.k8s.io/volume-role" = "main"
} }
location = "fsn1" location = "fsn1"
name = "etcd-1.etcd-main.minimal.k8s.local" name = "etcd-1.etcd-main.minimal.example.com"
size = 20 size = 20
} }