Skip to content

Commit

Permalink
use the k8s minor version (#4332)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-g-town authored Feb 26, 2024
1 parent dab8157 commit 8338655
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions dashboard/src/components/AzureProvisionerSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const skuTierOptions = [
},
];

const clusterVersionOptions = [{ value: "v1.27.3", label: "v1.27" }];
const clusterVersionOptions = [{ value: "v1.27", label: "v1.27" }];

type Props = RouteComponentProps & {
selectedClusterVersion?: Contract;
Expand Down Expand Up @@ -83,7 +83,7 @@ const AzureProvisionerSettings: React.FC<Props> = (props) => {
const [minInstances, setMinInstances] = useState(1);
const [maxInstances, setMaxInstances] = useState(10);
const [cidrRange, setCidrRange] = useState("10.78.0.0/16");
const [clusterVersion, setClusterVersion] = useState("v1.27.3");
const [clusterVersion, setClusterVersion] = useState("v1.27");
const [isReadOnly, setIsReadOnly] = useState(false);
const [skuTier, setSkuTier] = useState(AksSkuTier.FREE);
const [errorMessage, setErrorMessage] = useState<string>("");
Expand Down Expand Up @@ -251,7 +251,7 @@ const AzureProvisionerSettings: React.FC<Props> = (props) => {
case: "aksKind",
value: new AKS({
clusterName,
clusterVersion: clusterVersion || "v1.27.3",
clusterVersion: clusterVersion || "v1.27",
cidrRange: cidrRange || "10.78.0.0/16",
location: azureLocation,
nodePools,
Expand Down Expand Up @@ -369,7 +369,9 @@ const AzureProvisionerSettings: React.FC<Props> = (props) => {
setCreateStatus("");
setClusterName(aksValues.clusterName);
setAzureLocation(aksValues.location);
setClusterVersion(aksValues.clusterVersion);
const clusterVersionSplit = aksValues.clusterVersion.split(".");
const minorClusterVersion = clusterVersionSplit.slice(0, 2).join(".");
setClusterVersion(minorClusterVersion);
setCidrRange(aksValues.cidrRange);
if (aksValues.skuTier !== AksSkuTier.UNSPECIFIED) {
setSkuTier(aksValues.skuTier);
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/lib/clusters/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ const DEFAULT_AKS_CONTRACT = new Contract({
kindValues: {
case: "aksKind",
value: {
clusterVersion: "v1.27.3",
clusterVersion: "v1.27",
cidrRange: "10.78.0.0/16",
skuTier: AksSkuTier.FREE,
},
Expand Down

0 comments on commit 8338655

Please sign in to comment.