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

Configure extension DNS settings in the spec.extensions section #1888

Merged
merged 24 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5b26d8b
Adapted to DNS Changes
grolu Jun 4, 2024
f4311d1
PR Feedback #1
grolu Jun 7, 2024
6d3ca6c
Removed getResourceRefName utils function
grolu Jun 10, 2024
92e0b98
PR Feedback #2
grolu Jun 10, 2024
241e679
Merge branch 'master' into enh/adapt_to_dns_changes
grolu Jun 10, 2024
ddeda97
Made custom cluster domain required if checkbox is selected
grolu Jun 10, 2024
0fdf52f
Merge branch 'enh/adapt_to_dns_changes' of github.com:gardener/dashbo…
grolu Jun 10, 2024
695ab8b
Merge branch 'master' into enh/adapt_to_dns_changes
grolu Jun 11, 2024
7bb735f
Merge branch 'master' into enh/adapt_to_dns_changes
grolu Jun 11, 2024
46cbdb7
Removed dnsState
grolu Jun 17, 2024
725db1e
Some minor code styling changes
grolu Jun 17, 2024
7a4b183
Merge branch 'master' into enh/adapt_to_dns_changes
grolu Jun 17, 2024
249942d
Feedback to `enh/adapt_to_dns_changes` (#1928)
holgerkoser Jun 20, 2024
b38102b
Some UI Feedback
grolu Jun 24, 2024
7858eff
Explicit DNS Configuration Migration
grolu Jun 24, 2024
4e42744
Merge branch 'master' into enh/adapt_to_dns_changes
grolu Jun 25, 2024
f6ce924
changed ddns vendor name to rfc2136 (as this is the correct value for…
grolu Jun 25, 2024
d03cb39
Fixed dns provider combobox chips
grolu Jun 26, 2024
f78c64d
Merge
grolu Jun 28, 2024
dc7e3a4
Reset domain input field
grolu Jun 28, 2024
d1ef970
PR Feedback
grolu Jul 8, 2024
fe33650
PR Feedback
grolu Jul 8, 2024
7ae2e82
PR Feedback
grolu Jul 8, 2024
8abb37c
Merge branch 'master' into enh/adapt_to_dns_changes
grolu Jul 8, 2024
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
14 changes: 0 additions & 14 deletions backend/lib/routes/shoots.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,20 +188,6 @@ router.route('/:name/spec/controlPlane/highAvailability')
}
})

router.route('/:name/spec/dns')
.all(metricsMiddleware)
.put(async (req, res, next) => {
try {
const user = req.user
const namespace = req.params.namespace
const name = req.params.name
const body = req.body
res.send(await shoots.replaceDns({ user, namespace, name, body }))
} catch (err) {
next(err)
}
})

router.route('/:name/spec/provider')
.all(metricsMiddleware)
.patch(async (req, res, next) => {
Expand Down
12 changes: 0 additions & 12 deletions backend/lib/services/shoots.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,18 +224,6 @@ exports.replaceControlPlaneHighAvailability = async function ({ user, namespace,
return client['core.gardener.cloud'].shoots.mergePatch(namespace, name, payload)
}

exports.replaceDns = async function ({ user, namespace, name, body }) {
const client = user.client
const dns = body
const payload = {
spec: {
dns
}
}

return client['core.gardener.cloud'].shoots.mergePatch(namespace, name, payload)
}

exports.patchProvider = async function ({ user, namespace, name, body }) {
const client = user.client
const payload = {
Expand Down
150 changes: 0 additions & 150 deletions backend/test/acceptance/__snapshots__/api.shoots.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -315,156 +315,6 @@ exports[`api shoots should replace addons 2`] = `
}
`;

exports[`api shoots should replace control plane high availablility 1`] = `
[
[
{
":authority": "kubernetes:6443",
":method": "patch",
":path": "/apis/core.gardener.cloud/v1beta1/namespaces/garden-foo/shoots/barShoot",
":scheme": "https",
"authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImZvb0BleGFtcGxlLm9yZyIsImlhdCI6MTU3NzgzNjgwMCwiYXVkIjpbImdhcmRlbmVyIl0sImV4cCI6MzE1NTcxNjgwMCwianRpIjoianRpIn0.k3kGjF6AgugJLdwERXEWZPaibFAPFPOnmpT3YM9H0xU",
"content-type": "application/merge-patch+json",
},
{
"spec": {
"controlPlane": {
"highAvailability": {
"failureTolerance": {
"type": "node",
},
},
},
},
},
],
]
`;

exports[`api shoots should replace control plane high availablility 2`] = `
{
"metadata": {
"annotations": {
"gardener.cloud/created-by": "[email protected]",
},
"name": "barShoot",
"namespace": "garden-foo",
"resourceVersion": "43",
"uid": 2,
},
"spec": {
"cloudProfileName": "infra1-profileName",
"controlPlane": {
"highAvailability": {
"failureTolerance": {
"type": "node",
},
},
},
"hibernation": {
"enabled": false,
},
"kubernetes": {
"version": "1.16.0",
},
"provider": {
"type": "fooInfra",
},
"purpose": "barPurpose",
"region": "foo-west",
"secretBindingName": "foo-infra1",
"seedName": "infra1-seed",
},
"status": {
"advertisedAddresses": [
{
"name": "external",
"url": "https://api.barShoot.foo.shoot.test",
},
],
"technicalID": "shoot--foo--barShoot",
},
}
`;

exports[`api shoots should replace dns 1`] = `
[
[
{
":authority": "kubernetes:6443",
":method": "patch",
":path": "/apis/core.gardener.cloud/v1beta1/namespaces/garden-foo/shoots/barShoot",
":scheme": "https",
"authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImZvb0BleGFtcGxlLm9yZyIsImlhdCI6MTU3NzgzNjgwMCwiYXVkIjpbImdhcmRlbmVyIl0sImV4cCI6MzE1NTcxNjgwMCwianRpIjoianRpIn0.k3kGjF6AgugJLdwERXEWZPaibFAPFPOnmpT3YM9H0xU",
"content-type": "application/merge-patch+json",
},
{
"spec": {
"dns": {
"domain": "foo.bar",
"providers": [
{
"primary": "true",
"secretName": "foo-secret",
"type": "foo-provider",
},
],
},
},
},
],
]
`;

exports[`api shoots should replace dns 2`] = `
{
"metadata": {
"annotations": {
"gardener.cloud/created-by": "[email protected]",
},
"name": "barShoot",
"namespace": "garden-foo",
"resourceVersion": "43",
"uid": 2,
},
"spec": {
"cloudProfileName": "infra1-profileName",
"dns": {
"domain": "foo.bar",
"providers": [
{
"primary": "true",
"secretName": "foo-secret",
"type": "foo-provider",
},
],
},
"hibernation": {
"enabled": false,
},
"kubernetes": {
"version": "1.16.0",
},
"provider": {
"type": "fooInfra",
},
"purpose": "barPurpose",
"region": "foo-west",
"secretBindingName": "foo-infra1",
"seedName": "infra1-seed",
},
"status": {
"advertisedAddresses": [
{
"name": "external",
"url": "https://api.barShoot.foo.shoot.test",
},
],
"technicalID": "shoot--foo--barShoot",
},
}
`;

exports[`api shoots should replace hibernation enabled 1`] = `
[
[
Expand Down
45 changes: 0 additions & 45 deletions backend/test/acceptance/api.shoots.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,51 +484,6 @@ describe('api', function () {
expect(res.body).toMatchSnapshot()
})

it('should replace dns', async function () {
mockRequest.mockImplementationOnce(fixtures.shoots.mocks.patch())

const res = await agent
.put(`/api/namespaces/${namespace}/shoots/${name}/spec/dns`)
.set('cookie', await user.cookie)
.send({
domain: 'foo.bar',
providers: [
{
primary: 'true',
secretName: 'foo-secret',
type: 'foo-provider'
}
]
})
.expect('content-type', /json/)
.expect(200)

expect(mockRequest).toBeCalledTimes(1)
expect(mockRequest.mock.calls).toMatchSnapshot()

expect(res.body).toMatchSnapshot()
})

it('should replace control plane high availablility', async function () {
mockRequest.mockImplementationOnce(fixtures.shoots.mocks.patch())

const res = await agent
.put(`/api/namespaces/${namespace}/shoots/${name}/spec/controlPlane/highAvailability`)
.set('cookie', await user.cookie)
.send({
failureTolerance: {
type: 'node'
}
})
.expect('content-type', /json/)
.expect(200)

expect(mockRequest).toBeCalledTimes(1)
expect(mockRequest.mock.calls).toMatchSnapshot()

expect(res.body).toMatchSnapshot()
})

it('should return a shoot admin kubeconfig', async function () {
mockRequest.mockImplementationOnce(fixtures.shoots.mocks.createAdminKubeconfigRequest())

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`composables > useShootContext > should add dns providers 1`] = `
{
"domain": "example.org",
"providers": [
{
"primary": true,
"secretName": "aws-route53-secret",
"type": "aws-route53",
},
],
}
`;

exports[`composables > useShootContext > should add workers and update zones network config 1`] = `
[
{
Expand Down
Loading