case-insensitive resource type (#398)

* case-insensitive resource type

* inline error and throw outside switch

* consistent input naming

* catch failed clustertype parse

* protect raw input

* naming

* format
This commit is contained in:
David Gamero
2025-04-16 11:47:29 -04:00
committed by GitHub
parent 5dfb05d024
commit 99510dff95
7 changed files with 87 additions and 38 deletions
+4 -3
View File
@@ -3,7 +3,8 @@ import * as KubernetesConstants from '../types/kubernetesTypes'
import {Kubectl, Resource} from '../types/kubectl'
import {checkForErrors} from './kubectlUtils'
import {sleep} from './timeUtils'
import {ClusterType, ResourceTypeFleet} from '../actions/deploy'
import {ResourceTypeFleet} from '../actions/deploy'
import {ClusterType} from '../inputUtils'
const IS_SILENT = false
const POD = 'pod'
@@ -11,10 +12,10 @@ const POD = 'pod'
export async function checkManifestStability(
kubectl: Kubectl,
resources: Resource[],
clusterTyper: ClusterType
resourceType: ClusterType
): Promise<void> {
// Skip if resource type is microsoft.containerservice/fleets
if (clusterTyper === ResourceTypeFleet) {
if (resourceType === ResourceTypeFleet) {
core.info(`Skipping checkManifestStability for ${ResourceTypeFleet}`)
return
}