Skip to content

Commit

Permalink
Add support for Gardener 1.74
Browse files Browse the repository at this point in the history
  • Loading branch information
schrodit committed Nov 9, 2023
1 parent 94f7a17 commit e594e05
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 3 deletions.
2 changes: 1 addition & 1 deletion default.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

version: v1.73.2
version: v1.74.3

landscapeName: gardener-installation

Expand Down
2 changes: 2 additions & 0 deletions src/ts/versions/installations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {Installation as Installation_1_47} from './v1.47/installation';
import {Installation as Installation_1_50} from './v1.50/installation';
import {Installation as Installation_1_51} from './v1.51/installation';
import {Installation as Installation_1_62} from './v1.62/installation';
import {Installation as Installation_1_74} from './v1.74/installation';

export type InstallationConfig = {
genDir: string,
Expand Down Expand Up @@ -64,6 +65,7 @@ const versions: Record<string, InstallationConstructor> = {
'v1.71.x': Installation_1_62,
'v1.72.x': Installation_1_62,
'v1.73.x': Installation_1_62,
'v1.74.x': Installation_1_74,
};

export class VersionNotFound extends Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export class VirtualClusterChart extends Chart<VirtualClusterChartValues> {
}

public async renderValues(values: VirtualClusterChartValues): Promise<Values> {
console.log('virtual cluster', values.apiserver.version);
return {
name: 'virtual-cluster',
apiServer: {
Expand Down
4 changes: 3 additions & 1 deletion src/ts/versions/v1.46/installation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ export class Installation implements IInstallation {
if (stateValues === null) {
stateValues = emptyState(inputValues.version);
}


Check failure on line 43 in src/ts/versions/v1.46/installation.ts

View workflow job for this annotation

GitHub Actions / default

Trailing spaces not allowed
console.log('aaaa', stateValues.apiserver.version);
const values = await generateGardenerInstallationValues(stateValues, inputValues);
console.log('aaaa', values.apiserver.version);
await this.state.store(stateValues, inputValues);
log.info('Successfully stored state');

Expand Down
5 changes: 4 additions & 1 deletion src/ts/versions/v1.51/installation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export class Installation extends Installation_1_50 {
throw validateState(stateValues);
}
this.currentApiServerVersion = new SemVer(stateValues.apiserver.version ?? 'v1.18.2');
stateValues.apiserver.version = targetVirtualClusterVersion.raw;
if (new SemVer(this.currentApiServerVersion).compareMain(targetVirtualClusterVersion) === -1) {
stateValues.apiserver.version = targetVirtualClusterVersion.raw;
}
}
await super.install(flow, stateValues, inputValues);
}
Expand All @@ -58,6 +60,7 @@ export class Installation extends Installation_1_50 {
});
steps.push(latestVirtualClusterStep);
}
log.info(`virtual cluster is at ${this.currentApiServerVersion.raw}`);
return steps;
}
}
104 changes: 104 additions & 0 deletions src/ts/versions/v1.74/extensions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@

gardener:
extensions:
os-coreos:
enabled: true
version: v1.16.0
controllerRegistration:
repositoryName: gardener-extension-os-coreos

os-ubuntu:
enabled: true
version: v1.23.0
controllerRegistration:
repositoryName: gardener-extension-os-ubuntu

provider-gcp:
enabled: true
version: v1.32.1
controllerRegistration:
repositoryName: gardener-extension-provider-gcp

provider-openstack:
enabled: true
version: v1.37.1
controllerRegistration:
repositoryName: gardener-extension-provider-openstack

provider-dns-cloudflare:
enabled: true
version: v0.0.6
controllerRegistration:
org: schrodit
repositoryName: gardener-extension-provider-dns-cloudflare

provider-equinix:
enabled: true
version: v2.9.0
controllerRegistration:
repositoryName: gardener-extension-provider-equinix-metal
values:
image:
tag: v2.10.0-dev-6b7b511317539bc6b47b2702cda4d621b6d1f6ee

networking-cilium:
enabled: true
version: v1.30.2
controllerRegistration:
repositoryName: gardener-extension-networking-cilium

networking-calico:
enabled: true
version: v1.37.0
controllerRegistration:
repositoryName: gardener-extension-networking-calico

shoot-dns-service:
enabled: true
global: true

version: v1.38.3
controllerRegistration:
repositoryName: gardener-extension-shoot-dns-service

values:
dnsProviderReplication:
enabled: true
dnsProviderManagement:
enabled: true
dnsControllerManager:
image:
repository: eu.gcr.io/gardener-project/dns-controller-manager
tag: v0.13.3
configuration:
cacheTtl: 300
controllers: dnscontrollers,dnssources
dnsPoolResyncPeriod: 30m
#poolSize: 20
#providersPoolResyncPeriod: 24h
serverPortHttp: 8080
createCRDs: false
deploy: true
replicaCount: 1
#resources:
# limits:
# memory: 1Gi
# requests:
# cpu: 50m
# memory: 500Mi

shoot-cert-service:
enabled: true
global: true

version: v1.38.0
controllerRegistration:
repositoryName: gardener-extension-shoot-cert-service

values:
certificateConfig:
defaultIssuer:
acme:
email: foo@example.com
server: https://acme-v02.api.letsencrypt.org/directory
name: default-issuer
29 changes: 29 additions & 0 deletions src/ts/versions/v1.74/installation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import {Flow, VersionedValues} from '../../flow/Flow';
import {VersionedState} from '../../Landscape';
import {Installation as Installation_1_62} from '../v1.62/installation';
import {emptyState, isStateValues, validateState} from '../v1.46/Values';
import { SemVer } from 'semver';

Check failure on line 5 in src/ts/versions/v1.74/installation.ts

View workflow job for this annotation

GitHub Actions / default

`semver` import should occur before import of `../../flow/Flow`

Check failure on line 5 in src/ts/versions/v1.74/installation.ts

View workflow job for this annotation

GitHub Actions / default

There should be no space after '{'

export const VERSION = '1.74';

const targetVirtualClusterVersion = new SemVer('v1.22.17');

export class Installation extends Installation_1_62 {


public async install(flow: Flow, stateValues: null | VersionedState, inputValues: VersionedValues): Promise<void> {
if (stateValues === null) {
stateValues = emptyState(inputValues.version);
} else {
if (!isStateValues(stateValues)) {
throw validateState(stateValues);
}
}
// with gardener version 1.74 host and virtual cluster running at least 1.22 is required.
if (new SemVer(stateValues.apiserver.version).compareMain(targetVirtualClusterVersion) === -1) {
stateValues.apiserver.version = targetVirtualClusterVersion.raw;
}
await super.install(flow, stateValues, inputValues);
}

}

0 comments on commit e594e05

Please sign in to comment.