mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 05:15:25 +02:00
feat(helm): show manifest previews/changes when installing and upgrading a helm chart [r8s-405] (#898)
This commit is contained in:
parent
a4cff13531
commit
60bc04bc33
41 changed files with 763 additions and 157 deletions
47
app/react/kubernetes/helm/helmReleaseQueries/query-keys.ts
Normal file
47
app/react/kubernetes/helm/helmReleaseQueries/query-keys.ts
Normal file
|
@ -0,0 +1,47 @@
|
|||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
import { environmentQueryKeys } from '@/react/portainer/environments/queries/query-keys';
|
||||
|
||||
import { UpdateHelmReleasePayload } from '../types';
|
||||
|
||||
export const queryKeys = {
|
||||
// Environment-scoped Helm queries (following kubernetes pattern)
|
||||
base: (environmentId: EnvironmentId) =>
|
||||
[
|
||||
...environmentQueryKeys.item(environmentId),
|
||||
'kubernetes',
|
||||
'helm',
|
||||
] as const,
|
||||
|
||||
// Helm releases (environment-specific)
|
||||
releases: (environmentId: EnvironmentId) =>
|
||||
[...queryKeys.base(environmentId), 'releases'] as const,
|
||||
|
||||
release: (
|
||||
environmentId: EnvironmentId,
|
||||
namespace: string,
|
||||
name: string,
|
||||
revision?: number,
|
||||
showResources?: boolean
|
||||
) =>
|
||||
[
|
||||
...queryKeys.releases(environmentId),
|
||||
namespace,
|
||||
name,
|
||||
revision,
|
||||
showResources,
|
||||
] as const,
|
||||
|
||||
releaseHistory: (
|
||||
environmentId: EnvironmentId,
|
||||
namespace: string,
|
||||
name: string
|
||||
) =>
|
||||
[...queryKeys.release(environmentId, namespace, name), 'history'] as const,
|
||||
|
||||
// Environment-specific install operations
|
||||
installDryRun: (
|
||||
environmentId: EnvironmentId,
|
||||
payload: UpdateHelmReleasePayload
|
||||
) =>
|
||||
[...queryKeys.base(environmentId), 'install', 'dry-run', payload] as const,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue