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

EKS Provisioning #10581

Merged
merged 53 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
2ff4936
eks initial
mantis-toboggan-md Feb 2, 2024
9e9e1cb
k8s options
mantis-toboggan-md Feb 12, 2024
d7571b8
eks node group component
mantis-toboggan-md Feb 27, 2024
e5e6f2f
add config and networking components
mantis-toboggan-md Feb 28, 2024
5a9f169
fix default region on initial load
mantis-toboggan-md Feb 28, 2024
18e2ac3
use .sync modifier in network tab
mantis-toboggan-md Feb 28, 2024
8b1db0a
launch templates
mantis-toboggan-md Feb 29, 2024
2fe9406
node group styling
mantis-toboggan-md Mar 3, 2024
b35dafa
spot instances/launch template instance type
mantis-toboggan-md Mar 4, 2024
6ecda21
fix selectcredential footer when not showing the rest of the form
mantis-toboggan-md Mar 4, 2024
6b07966
cluster name description and options
mantis-toboggan-md Mar 4, 2024
088a2b5
iam listRoles
mantis-toboggan-md Mar 4, 2024
38729f9
subnets
mantis-toboggan-md Mar 5, 2024
217337a
k8s version dropdown custom
mantis-toboggan-md Mar 5, 2024
264ed50
logging tab
mantis-toboggan-md Mar 5, 2024
4f40e1c
agent deployment customization, labels and annotations
mantis-toboggan-md Mar 5, 2024
8e76a24
working default values
mantis-toboggan-md Mar 5, 2024
a291d72
fix edit eks/aks
mantis-toboggan-md Mar 5, 2024
f694a63
instance types dropdown improvements and spot instance type filtering
mantis-toboggan-md Mar 6, 2024
a8ed4e4
validation;
mantis-toboggan-md Mar 6, 2024
4a2267c
todos
mantis-toboggan-md Mar 7, 2024
7337673
tests
mantis-toboggan-md Mar 7, 2024
19c090b
move diffUpstreamSpec
mantis-toboggan-md Mar 8, 2024
e9a4b05
clean up
mantis-toboggan-md Mar 8, 2024
6aa7691
improve launch template loading appearance
mantis-toboggan-md Mar 12, 2024
657dbb1
fix kms key fetch
mantis-toboggan-md Mar 12, 2024
31f5e7f
fix custom role radio
mantis-toboggan-md Mar 13, 2024
681d79c
fix failing nodegroup test
mantis-toboggan-md Mar 22, 2024
d0f610d
fix lint
mantis-toboggan-md Mar 22, 2024
4961724
fix typescript errors in crueks
mantis-toboggan-md Mar 27, 2024
28f890a
nodegroup ts
mantis-toboggan-md Mar 28, 2024
1ce8ef7
cache ec2 instance types
mantis-toboggan-md Mar 28, 2024
f60e2a4
cache instance types in vuex
mantis-toboggan-md Mar 28, 2024
6d7ae4b
nodegroup ts
mantis-toboggan-md Mar 28, 2024
e45a88c
ts errors in eks networking
mantis-toboggan-md Mar 29, 2024
a925b71
eks config ts errors
mantis-toboggan-md Mar 29, 2024
09aa14c
tweak nodegroup input sizing
mantis-toboggan-md Mar 29, 2024
8f61353
reset nodegroup default values if the launch template is cleared
mantis-toboggan-md Apr 1, 2024
d4111e4
add tooltips and userdata file upload button to node groups
mantis-toboggan-md Apr 1, 2024
756af32
add networking tooltips; make credential dropdown half width when not…
mantis-toboggan-md Apr 1, 2024
f4b5d55
fix rancher managed launch template detection
mantis-toboggan-md Apr 2, 2024
2692751
fix networking tooltip
mantis-toboggan-md Apr 2, 2024
7199717
show when a node group has a rancher-managed launch template
mantis-toboggan-md Apr 2, 2024
afe43fa
fix error filtering for ec2 iam roles
mantis-toboggan-md Apr 2, 2024
2f4565d
add system labels and annotations for norman clusters
mantis-toboggan-md Apr 2, 2024
8e79d06
lint
mantis-toboggan-md Apr 2, 2024
30fda25
lint
mantis-toboggan-md Apr 2, 2024
770db07
fix labels and annotations getters in norman cluster model
mantis-toboggan-md Apr 8, 2024
6123251
added tests for norman cluster system labels and annotations
mantis-toboggan-md Apr 8, 2024
754b130
fix some eks typescript and hide cluster name when no credential
mantis-toboggan-md Apr 8, 2024
bd303a1
fix userdata sublabel link
mantis-toboggan-md Apr 11, 2024
e181139
fix networking info banner translation typo
mantis-toboggan-md Apr 11, 2024
aa9753f
node group size labels and tags should be editable
mantis-toboggan-md Apr 16, 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
4 changes: 2 additions & 2 deletions cypress/e2e/blueprints/manager/clusterProviderUrlCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ export const providersList = [
conditions: [
{
rkeType: 'rke2',
loads: 'rke1'
loads: 'rke2'
},
{
rkeType: 'rke1',
loads: 'rke1'
loads: 'rke2'
},
]
},
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"dependencies": {
"@aws-sdk/client-ec2": "3.1.0",
"@aws-sdk/client-eks": "3.1.0",
"@aws-sdk/client-iam": "3.18.0",
"@aws-sdk/client-kms": "3.8.1",
"@innologica/vue-dropdown-menu": "0.1.3",
"@novnc/novnc": "1.2.0",
Expand Down Expand Up @@ -131,6 +132,7 @@
"devDependencies": {
"@babel/plugin-proposal-optional-chaining": "7.14.5",
"@babel/plugin-proposal-private-property-in-object": "7.14.5",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4",
"@babel/preset-typescript": "7.16.7",
"@cypress/code-coverage": "3.10.4",
"@cypress/grep": "^3.1.5",
Expand Down
7 changes: 5 additions & 2 deletions pkg/aks/components/CruAks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ import ClusterMembershipEditor, { canViewClusterMembershipEditor } from '@shell/
import AksNodePool from '@pkg/aks/components/AksNodePool.vue';
import type { AKSDiskType, AKSNodePool, AKSPoolMode, AKSConfig } from '../types/index';
import {
diffUpstreamSpec, getAKSRegions, getAKSVirtualNetworks, getAKSVMSizes, getAKSKubernetesVersions
getAKSRegions, getAKSVirtualNetworks, getAKSVMSizes, getAKSKubernetesVersions
, regionsWithAvailabilityZones
} from '@pkg/aks/util/aks';

import { diffUpstreamSpec } from '@shell/utils/kontainer';
import {
requiredInCluster,
clusterNameChars,
Expand Down Expand Up @@ -893,7 +895,7 @@ export default defineComponent({
label-key="aks.location.azWarning"
color="warning"
/>
<div><h4>{{ t('aks.nodePools.title') }}</h4></div>
<div><h3>{{ t('aks.nodePools.title') }}</h3></div>
<Tabbed
ref="pools"
:side-tabs="true"
Expand Down Expand Up @@ -1290,4 +1292,5 @@ export default defineComponent({
display: flex;
align-items: center;
}

</style>
10 changes: 10 additions & 0 deletions pkg/eks/assets/amazoneks-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions pkg/eks/assets/amazoneks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions pkg/eks/assets/data/eks-versions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default ['[1.29',

'1.28',

'1.27',

'1.26',

'1.25'];
1 change: 1 addition & 0 deletions pkg/eks/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./.shell/pkg/babel.config.js');
176 changes: 176 additions & 0 deletions pkg/eks/components/AccountAccess.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { _CREATE, _VIEW } from '@shell/config/query-params';
import LabeledSelect from '@shell/components/form/LabeledSelect.vue';
import SelectCredential from '@shell/edit/provisioning.cattle.io.cluster/SelectCredential.vue';
import { DEFAULT_REGION } from './CruEKS.vue';
import { mapGetters } from 'vuex';
import { AWS } from 'types';

export default defineComponent({
name: 'EKSAccountAccess',

components: {
LabeledSelect,
SelectCredential
},

props: {
mode: {
type: String,
default: _CREATE
},

credential: {
type: String,
default: null
},

region: {
type: String,
default: ''
}
},

async fetch() {
if (this.mode !== _VIEW) {
this.defaultRegions = await this.$store.dispatch('aws/defaultRegions');
if (this.defaultRegions.length && !this.region) {
this.$emit('update-region', DEFAULT_REGION);
}
}
},

data() {
return { regions: [] as string[], defaultRegions: [] as string[] };
},

watch: {
isAuthenticated: {
async handler(neu) {
if (neu && this.mode !== _VIEW) {
await this.fetchRegions();
} else {
if (this.defaultRegions.length && !this.defaultRegions.includes(this.region)) {
if (this.defaultRegions.includes(DEFAULT_REGION)) {
this.$emit('update-region', DEFAULT_REGION);
} else {
this.$emit('update-region', this.defaultRegions[0]);
}
}
}
},
immediate: true
}
},

methods: {
async fetchRegions() {
const { region, credential }: { region: string, credential: string} = this;

if (!!region && !!credential) {
try {
const ec2Client = await this.$store.dispatch('aws/ec2', { region, cloudCredentialId: credential });

const res: {Regions: AWS.EC2Region[]} = await ec2Client.describeRegions({});

this.regions = (res?.Regions || []).map((r) => r.RegionName);
richard-cox marked this conversation as resolved.
Show resolved Hide resolved
} catch (err) {
this.$emit('error', this.t('eks.errors.fetchingRegions', { err }));
}
}
},
},

computed: {
...mapGetters({ t: 'i18n/t' }),

// once the credential is validated we can fetch a list of available regions
isAuthenticated(): boolean {
return !!this.credential;
},

regionOptions(): string[] {
return this.regions.length ? this.regions : this.defaultRegions;
},

CREATE(): string {
return _CREATE;
},

VIEW(): string {
return _VIEW;
},

},
});
</script>

<template>
<div
:class="{'showing-form': !credential}"
class="credential-region"
>
<div class="region mb-10">
<LabeledSelect
:disabled="mode!=='create'"
:value="region"
label-key="eks.region.label"
:options="regionOptions"
@input="$emit('update-region', $event)"
/>
</div>
<div
class="select-credential-container mb-10"
>
<SelectCredential
:value="credential"
data-testid="crueks-select-credential"
:mode="mode === VIEW ? VIEW : CREATE"
provider="aws"
:default-on-cancel="true"
:showing-form="!credential"
class="select-credential"
:cancel="()=>$emit('cancel-credential')"
@input="$emit('update-credential', $event)"
/>
</div>
</div>
</template>

<style lang="scss">
.credential-region {
display: flex;
flex-grow:1;

.region {
flex-basis: 50%;
flex-grow: 0;
margin: 0 1.75% 0 0;
}

&.showing-form {
flex-direction: column;

&>.region {
margin: 0;
}

&>.select-credential-container{
display:flex;
flex-direction: column;
flex-grow: 1;
}
}

&>.select-credential-container{
flex-basis: 50%;

&>.select-credential{
flex-grow: 1;
}

}
}

</style>
Loading
Loading