github.com/argoproj/argo-cd/v3@v3.2.1/ui/src/app/shared/models.ts (about) 1 import {models} from 'argo-ui'; 2 3 interface ItemsList<T> { 4 /** 5 * APIVersion defines the versioned schema of this representation of an object. 6 * Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. 7 */ 8 apiVersion?: string; 9 items: T[]; 10 /** 11 * Kind is a string value representing the REST resource this object represents. 12 * Servers may infer this from the endpoint the client submits requests to. 13 */ 14 kind?: string; 15 metadata: models.ListMeta; 16 } 17 18 export interface ApplicationList extends ItemsList<Application> {} 19 20 export interface SyncOperationResource { 21 group: string; 22 kind: string; 23 name: string; 24 } 25 26 export interface SyncStrategy { 27 apply?: {force?: boolean}; 28 hook?: {force?: boolean}; 29 } 30 31 export interface SyncOperation { 32 revision: string; 33 prune: boolean; 34 dryRun: boolean; 35 resources?: SyncOperationResource[]; 36 } 37 38 export interface RetryBackoff { 39 duration: string; 40 maxDuration: string; 41 factor: number; 42 } 43 44 export interface RetryStrategy { 45 limit: number; 46 backoff: RetryBackoff; 47 refresh: boolean; 48 } 49 50 export interface RollbackOperation { 51 id: number; 52 prune: boolean; 53 dryRun: boolean; 54 } 55 56 export interface OperationInitiator { 57 username: string; 58 automated: boolean; 59 } 60 61 export interface Operation { 62 sync: SyncOperation; 63 initiatedBy: OperationInitiator; 64 } 65 66 export type OperationPhase = 'Running' | 'Error' | 'Failed' | 'Succeeded' | 'Terminating' | 'Progressing' | 'Pending' | 'Waiting'; 67 68 export const OperationPhases = { 69 Running: 'Running' as OperationPhase, 70 Failed: 'Failed' as OperationPhase, 71 Error: 'Error' as OperationPhase, 72 Succeeded: 'Succeeded' as OperationPhase, 73 Terminating: 'Terminating' as OperationPhase, 74 Progressing: 'Progressing' as OperationPhase, 75 Pending: 'Pending' as OperationPhase, 76 Waiting: 'Waiting' as OperationPhase 77 }; 78 79 /** 80 * OperationState contains information about state of currently performing operation on application. 81 */ 82 export interface OperationState { 83 operation: Operation; 84 phase: OperationPhase; 85 message: string; 86 syncResult: SyncOperationResult; 87 startedAt: models.Time; 88 finishedAt: models.Time; 89 } 90 91 export type HookType = 'PreSync' | 'Sync' | 'PostSync' | 'SyncFail' | 'Skip'; 92 93 export interface RevisionMetadata { 94 author?: string; 95 date: models.Time; 96 tags?: string[]; 97 message?: string; 98 signatureInfo?: string; 99 } 100 101 export interface OCIMetadata { 102 createdAt: string; 103 authors: string; 104 docsUrl: string; 105 sourceUrl: string; 106 version: string; 107 description: string; 108 } 109 110 export interface ChartDetails { 111 description?: string; 112 maintainers?: string[]; 113 home?: string; 114 } 115 116 export interface SyncOperationResult { 117 resources: ResourceResult[]; 118 revision: string; 119 revisions: string[]; 120 } 121 122 export type ResultCode = 'Synced' | 'SyncFailed' | 'Pruned' | 'PruneSkipped'; 123 124 export const ResultCodes = { 125 Synced: 'Synced', 126 SyncFailed: 'SyncFailed', 127 Pruned: 'Pruned', 128 PruneSkipped: 'PruneSkipped' 129 }; 130 131 export interface ResourceResult { 132 name: string; 133 group: string; 134 kind: string; 135 version: string; 136 namespace: string; 137 status: ResultCode; 138 message: string; 139 hookType: HookType; 140 hookPhase: OperationPhase; 141 images?: string[]; 142 } 143 144 export type SyncResourceResult = ResourceResult & { 145 health?: HealthStatus; 146 syncWave?: number; 147 }; 148 149 export const AnnotationRefreshKey = 'argocd.argoproj.io/refresh'; 150 export const AnnotationHookKey = 'argocd.argoproj.io/hook'; 151 export const AnnotationSyncWaveKey = 'argocd.argoproj.io/sync-wave'; 152 export const AnnotationDefaultView = 'pref.argocd.argoproj.io/default-view'; 153 export const AnnotationDefaultPodSort = 'pref.argocd.argoproj.io/default-pod-sort'; 154 155 export interface Application { 156 apiVersion?: string; 157 kind?: string; 158 metadata: models.ObjectMeta; 159 spec: ApplicationSpec; 160 status: ApplicationStatus; 161 operation?: Operation; 162 isAppOfAppsPattern?: boolean; 163 } 164 165 export type WatchType = 'ADDED' | 'MODIFIED' | 'DELETED' | 'ERROR'; 166 167 export interface ApplicationWatchEvent { 168 type: WatchType; 169 application: Application; 170 } 171 172 export interface ComponentParameter { 173 component: string; 174 name: string; 175 value: string; 176 } 177 178 export interface ApplicationDestination { 179 /** 180 * Server address of the destination cluster 181 */ 182 server: string; 183 /** 184 * Namespace of the destination cluster 185 */ 186 namespace: string; 187 /** 188 * Name of the destination cluster which can be used instead of server (url) field 189 */ 190 name: string; 191 } 192 193 export interface ApplicationDestinationServiceAccount { 194 server: string; 195 namespace: string; 196 defaultServiceAccount: string; 197 } 198 199 export interface OrphanedResource { 200 group: string; 201 kind: string; 202 name: string; 203 } 204 205 export interface ApplicationSource { 206 targetRevision: string; 207 /** 208 * RepoURL is repository URL which contains application project. 209 */ 210 repoURL: string; 211 212 /** 213 * Path is a directory path within repository which 214 */ 215 path?: string; 216 217 chart?: string; 218 219 helm?: ApplicationSourceHelm; 220 221 kustomize?: ApplicationSourceKustomize; 222 223 plugin?: ApplicationSourcePlugin; 224 225 directory?: ApplicationSourceDirectory; 226 227 ref?: string; 228 229 name?: string; 230 } 231 232 export interface SourceHydrator { 233 drySource: DrySource; 234 syncSource: SyncSource; 235 hydrateTo?: HydrateTo; 236 } 237 238 export interface DrySource { 239 repoURL: string; 240 targetRevision: string; 241 path: string; 242 } 243 244 export interface SyncSource { 245 targetBranch: string; 246 path: string; 247 } 248 249 export interface HydrateTo { 250 targetBranch: string; 251 } 252 253 export interface ApplicationSourceHelm { 254 valueFiles: string[]; 255 values?: string; 256 valuesObject?: any; 257 parameters: HelmParameter[]; 258 fileParameters: HelmFileParameter[]; 259 } 260 261 export interface ApplicationSourceKustomize { 262 namePrefix: string; 263 nameSuffix: string; 264 images: string[]; 265 version: string; 266 namespace: string; 267 } 268 export interface EnvEntry { 269 name: string; 270 value: string; 271 } 272 273 export interface ApplicationSourcePlugin { 274 name: string; 275 env: EnvEntry[]; 276 parameters?: Parameter[]; 277 } 278 279 export interface Parameter { 280 name: string; 281 string?: string; 282 array?: string[]; 283 map?: Map<string, string>; 284 } 285 286 export interface JsonnetVar { 287 name: string; 288 value: string; 289 code: boolean; 290 } 291 292 interface ApplicationSourceJsonnet { 293 extVars: JsonnetVar[]; 294 tlas: JsonnetVar[]; 295 } 296 297 export interface ApplicationSourceDirectory { 298 recurse: boolean; 299 jsonnet?: ApplicationSourceJsonnet; 300 include?: string; 301 exclude?: string; 302 } 303 304 export interface Automated { 305 prune: boolean; 306 selfHeal: boolean; 307 enabled: boolean; 308 } 309 310 export interface SyncPolicy { 311 automated?: Automated; 312 syncOptions?: string[]; 313 retry?: RetryStrategy; 314 } 315 316 export interface Info { 317 name: string; 318 value: string; 319 } 320 321 export interface ApplicationSpec { 322 project: string; 323 source: ApplicationSource; 324 sources: ApplicationSource[]; 325 sourceHydrator?: SourceHydrator; 326 destination: ApplicationDestination; 327 syncPolicy?: SyncPolicy; 328 ignoreDifferences?: ResourceIgnoreDifferences[]; 329 info?: Info[]; 330 revisionHistoryLimit?: number; 331 } 332 333 export interface ResourceIgnoreDifferences { 334 group: string; 335 kind: string; 336 name: string; 337 namespace: string; 338 jsonPointers: string[]; 339 jqPathExpressions: string[]; 340 } 341 342 /** 343 * RevisionHistory contains information relevant to an application deployment 344 */ 345 export interface RevisionHistory { 346 id: number; 347 revision: string; 348 source: ApplicationSource; 349 revisions: string[]; 350 sources: ApplicationSource[]; 351 deployStartedAt: models.Time; 352 deployedAt: models.Time; 353 initiatedBy: OperationInitiator; 354 } 355 356 export type SyncStatusCode = 'Unknown' | 'Synced' | 'OutOfSync'; 357 358 export const SyncStatuses: {[key: string]: SyncStatusCode} = { 359 Unknown: 'Unknown', 360 Synced: 'Synced', 361 OutOfSync: 'OutOfSync' 362 }; 363 364 export const SyncPriority: Record<SyncStatusCode, number> = { 365 Unknown: 0, 366 OutOfSync: 1, 367 Synced: 2 368 }; 369 370 export type HealthStatusCode = 'Unknown' | 'Progressing' | 'Healthy' | 'Suspended' | 'Degraded' | 'Missing'; 371 372 export const HealthStatuses: {[key: string]: HealthStatusCode} = { 373 Progressing: 'Progressing', 374 Suspended: 'Suspended', 375 Healthy: 'Healthy', 376 Degraded: 'Degraded', 377 Missing: 'Missing', 378 Unknown: 'Unknown' 379 }; 380 381 export const HealthPriority: Record<HealthStatusCode, number> = { 382 Missing: 0, 383 Degraded: 1, 384 Unknown: 2, 385 Progressing: 3, 386 Suspended: 4, 387 Healthy: 5 388 }; 389 390 export interface HealthStatus { 391 status: HealthStatusCode; 392 message: string; 393 } 394 395 export type State = models.TypeMeta & {metadata: models.ObjectMeta} & {status: any; spec: any}; 396 397 export type ReadinessGate = { 398 conditionType: string; 399 }; 400 401 export interface ResourceStatus { 402 group: string; 403 version: string; 404 kind: string; 405 namespace: string; 406 name: string; 407 status: SyncStatusCode; 408 health: HealthStatus; 409 createdAt?: models.Time; 410 hook?: boolean; 411 requiresPruning?: boolean; 412 requiresDeletionConfirmation?: boolean; 413 syncWave?: number; 414 orphaned?: boolean; 415 } 416 417 export interface ResourceRef { 418 uid: string; 419 kind: string; 420 namespace: string; 421 name: string; 422 version: string; 423 group: string; 424 } 425 426 export interface ResourceNetworkingInfo { 427 targetLabels: {[name: string]: string}; 428 targetRefs: ResourceRef[]; 429 labels: {[name: string]: string}; 430 ingress: LoadBalancerIngress[]; 431 externalURLs: string[]; 432 } 433 434 export interface LoadBalancerIngress { 435 hostname: string; 436 ip: string; 437 } 438 439 export interface InfoItem { 440 name: string; 441 value: string; 442 } 443 444 export interface ResourceNode extends ResourceRef { 445 parentRefs: ResourceRef[]; 446 info: InfoItem[]; 447 networkingInfo?: ResourceNetworkingInfo; 448 images?: string[]; 449 resourceVersion: string; 450 createdAt?: models.Time; 451 } 452 453 export interface ApplicationTree { 454 nodes: ResourceNode[]; 455 orphanedNodes: ResourceNode[]; 456 hosts: Node[]; 457 } 458 459 export interface ResourceID { 460 group: string; 461 kind: string; 462 namespace: string; 463 name: string; 464 } 465 466 export interface ResourceDiff extends ResourceID { 467 targetState: State; 468 liveState: State; 469 predictedLiveState: State; 470 normalizedLiveState: State; 471 hook: boolean; 472 } 473 474 export interface SyncStatus { 475 comparedTo: ApplicationSource; 476 status: SyncStatusCode; 477 revision: string; 478 revisions: string[]; 479 } 480 481 export interface ApplicationCondition { 482 type: string; 483 message: string; 484 lastTransitionTime: string; 485 } 486 487 export interface ApplicationSummary { 488 externalURLs?: string[]; 489 images?: string[]; 490 } 491 492 export interface ApplicationStatus { 493 observedAt: models.Time; 494 resources: ResourceStatus[]; 495 sync: SyncStatus; 496 conditions?: ApplicationCondition[]; 497 history: RevisionHistory[]; 498 health: HealthStatus; 499 operationState?: OperationState; 500 summary?: ApplicationSummary; 501 sourceHydrator?: SourceHydratorStatus; 502 } 503 504 export interface SourceHydratorStatus { 505 lastSuccessfulOperation?: SuccessfulHydrateOperation; 506 currentOperation?: HydrateOperation; 507 } 508 509 export interface HydrateOperation { 510 startedAt: models.Time; 511 finishedAt?: models.Time; 512 phase: HydrateOperationPhase; 513 message: string; 514 drySHA: string; 515 hydratedSHA: string; 516 sourceHydrator: SourceHydrator; 517 } 518 519 export interface SuccessfulHydrateOperation { 520 drySHA: string; 521 hydratedSHA: string; 522 sourceHydrator: SourceHydrator; 523 } 524 525 export type HydrateOperationPhase = 'Hydrating' | 'Failed' | 'Hydrated'; 526 527 export const HydrateOperationPhases = { 528 Hydrating: 'Hydrating' as OperationPhase, 529 Failed: 'Failed' as OperationPhase, 530 Hydrated: 'Hydrated' as OperationPhase 531 }; 532 533 export interface JwtTokens { 534 items: JwtToken[]; 535 } 536 export interface AppProjectStatus { 537 jwtTokensByRole: {[name: string]: JwtTokens}; 538 } 539 540 export interface LogEntry { 541 content: string; 542 timeStamp: models.Time; 543 // first field is inferred on the fly and indicats first log line received from backend 544 first?: boolean; 545 last: boolean; 546 timeStampStr: string; 547 podName: string; 548 } 549 550 // describes plugin settings 551 export interface Plugin { 552 name: string; 553 } 554 555 export interface AuthSettings { 556 url: string; 557 statusBadgeEnabled: boolean; 558 statusBadgeRootUrl: string; 559 googleAnalytics: { 560 trackingID: string; 561 anonymizeUsers: boolean; 562 }; 563 dexConfig: { 564 connectors: { 565 name: string; 566 type: string; 567 }[]; 568 }; 569 oidcConfig: { 570 name: string; 571 }; 572 help: { 573 chatUrl: string; 574 chatText: string; 575 binaryUrls: Record<string, string>; 576 }; 577 userLoginsDisabled: boolean; 578 kustomizeVersions: string[]; 579 uiCssURL: string; 580 uiBannerContent: string; 581 uiBannerURL: string; 582 uiBannerPermanent: boolean; 583 uiBannerPosition: string; 584 execEnabled: boolean; 585 appsInAnyNamespaceEnabled: boolean; 586 hydratorEnabled: boolean; 587 } 588 589 export interface UserInfo { 590 loggedIn: boolean; 591 username: string; 592 iss: string; 593 groups: string[]; 594 } 595 596 export type ConnectionStatus = 'Unknown' | 'Successful' | 'Failed'; 597 598 export const ConnectionStatuses = { 599 Unknown: 'Unknown', 600 Failed: 'Failed', 601 Successful: 'Successful' 602 }; 603 604 export interface ConnectionState { 605 status: ConnectionStatus; 606 message: string; 607 attemptedAt: models.Time; 608 } 609 610 export interface RepoCert { 611 serverName: string; 612 certType: string; 613 certSubType: string; 614 certData: string; 615 certInfo: string; 616 } 617 618 export interface RepoCertList extends ItemsList<RepoCert> {} 619 620 export interface Repository { 621 repo: string; 622 type?: string; 623 name?: string; 624 connectionState: ConnectionState; 625 project?: string; 626 username?: string; 627 password?: string; 628 bearerToken?: string; 629 tlsClientCertData?: string; 630 tlsClientCertKey?: string; 631 proxy?: string; 632 noProxy?: string; 633 insecure?: boolean; 634 enableLfs?: boolean; 635 githubAppId?: string; 636 forceHttpBasicAuth?: boolean; 637 insecureOCIForceHttp?: boolean; 638 enableOCI: boolean; 639 useAzureWorkloadIdentity: boolean; 640 } 641 642 export interface RepositoryList extends ItemsList<Repository> {} 643 644 export interface RepoCreds { 645 url: string; 646 username?: string; 647 bearerToken?: string; 648 } 649 650 export interface RepoCredsList extends ItemsList<RepoCreds> {} 651 652 export interface Cluster { 653 name: string; 654 server: string; 655 namespaces?: []; 656 refreshRequestedAt?: models.Time; 657 config?: { 658 awsAuthConfig?: { 659 clusterName: string; 660 }; 661 execProviderConfig?: { 662 command: string; 663 }; 664 }; 665 info?: { 666 applicationsCount: number; 667 serverVersion: string; 668 connectionState: ConnectionState; 669 cacheInfo: ClusterCacheInfo; 670 }; 671 annotations?: {[name: string]: string}; 672 labels?: {[name: string]: string}; 673 } 674 675 export interface ClusterCacheInfo { 676 resourcesCount: number; 677 apisCount: number; 678 lastCacheSyncTime: models.Time; 679 } 680 681 export interface ClusterList extends ItemsList<Cluster> {} 682 683 export interface HelmChart { 684 name: string; 685 versions: string[]; 686 } 687 688 export type AppSourceType = 'Helm' | 'Kustomize' | 'Directory' | 'Plugin'; 689 690 export interface RepoAppDetails { 691 type: AppSourceType; 692 path: string; 693 helm?: HelmAppSpec; 694 kustomize?: KustomizeAppSpec; 695 plugin?: PluginAppSpec; 696 directory?: {}; 697 } 698 699 export interface RefsInfo { 700 branches: string[]; 701 tags: string[]; 702 } 703 704 export interface AppInfo { 705 type: string; 706 path: string; 707 } 708 709 export interface HelmParameter { 710 name: string; 711 value: string; 712 } 713 714 export interface HelmFileParameter { 715 name: string; 716 path: string; 717 } 718 719 export interface HelmAppSpec { 720 name: string; 721 path: string; 722 valueFiles: string[]; 723 values?: string; 724 parameters: HelmParameter[]; 725 fileParameters: HelmFileParameter[]; 726 } 727 728 export interface KustomizeAppSpec { 729 path: string; 730 images?: string[]; 731 namespace?: string; 732 } 733 734 export interface PluginAppSpec { 735 name: string; 736 env: EnvEntry[]; 737 parametersAnnouncement?: ParameterAnnouncement[]; 738 } 739 740 export interface ParameterAnnouncement { 741 name?: string; 742 title?: string; 743 tooltip?: string; 744 required?: boolean; 745 itemType?: string; 746 collectionType?: string; 747 string?: string; 748 array?: string[]; 749 map?: Map<string, string>; 750 } 751 752 export interface ObjectReference { 753 kind: string; 754 namespace: string; 755 name: string; 756 uid: string; 757 apiVersion: string; 758 resourceVersion: string; 759 fieldPath: string; 760 } 761 762 export interface EventSource { 763 component: string; 764 host: string; 765 } 766 767 export interface EventSeries { 768 count: number; 769 lastObservedTime: models.Time; 770 state: string; 771 } 772 773 export interface Event { 774 apiVersion?: string; 775 kind?: string; 776 metadata: models.ObjectMeta; 777 involvedObject: ObjectReference; 778 reason: string; 779 message: string; 780 source: EventSource; 781 firstTimestamp: models.Time; 782 lastTimestamp: models.Time; 783 count: number; 784 type: string; 785 eventTime: models.Time; 786 series: EventSeries; 787 action: string; 788 related: ObjectReference; 789 reportingController: string; 790 reportingInstance: string; 791 } 792 793 export interface EventList extends ItemsList<Event> {} 794 795 export interface ProjectRole { 796 description: string; 797 policies: string[]; 798 name: string; 799 groups: string[]; 800 } 801 802 export interface JwtToken { 803 iat: number; 804 exp: number; 805 id: string; 806 } 807 808 export interface GroupKind { 809 group: string; 810 kind: string; 811 } 812 813 export interface ProjectSignatureKey { 814 keyID: string; 815 } 816 817 export interface ProjectSpec { 818 sourceRepos: string[]; 819 sourceNamespaces: string[]; 820 destinations: ApplicationDestination[]; 821 destinationServiceAccounts: ApplicationDestinationServiceAccount[]; 822 description: string; 823 roles: ProjectRole[]; 824 clusterResourceWhitelist: GroupKind[]; 825 clusterResourceBlacklist: GroupKind[]; 826 namespaceResourceBlacklist: GroupKind[]; 827 namespaceResourceWhitelist: GroupKind[]; 828 signatureKeys: ProjectSignatureKey[]; 829 orphanedResources?: {warn?: boolean; ignore: OrphanedResource[]}; 830 syncWindows?: SyncWindows; 831 } 832 833 export type SyncWindows = SyncWindow[]; 834 835 export interface SyncWindow { 836 kind: string; 837 schedule: string; 838 duration: string; 839 applications: string[]; 840 namespaces: string[]; 841 clusters: string[]; 842 manualSync: boolean; 843 timeZone: string; 844 andOperator: boolean; 845 description: string; 846 } 847 848 export interface Project { 849 apiVersion?: string; 850 kind?: string; 851 metadata: models.ObjectMeta; 852 spec: ProjectSpec; 853 status: AppProjectStatus; 854 } 855 856 export interface DetailedProjectsResponse { 857 project: Project; 858 globalProjects: Project[]; 859 repositories: Repository[]; 860 clusters: Cluster[]; 861 } 862 863 export type ProjectList = ItemsList<Project>; 864 865 export const DEFAULT_PROJECT_NAME = 'default'; 866 867 export interface ManifestResponse { 868 manifests: string[]; 869 namespace: string; 870 server: string; 871 revision: string; 872 } 873 874 export interface ResourceActionParam { 875 name: string; 876 value: string; 877 type: string; 878 default: string; 879 } 880 881 export interface ResourceAction { 882 name: string; 883 params: ResourceActionParam[]; 884 disabled: boolean; 885 iconClass: string; 886 displayName: string; 887 } 888 889 export interface SyncWindowsState { 890 windows: SyncWindow[]; 891 } 892 893 export interface ApplicationSyncWindowState { 894 activeWindows: SyncWindow[]; 895 assignedWindows: SyncWindow[]; 896 canSync: boolean; 897 } 898 899 export interface VersionMessage { 900 Version: string; 901 BuildDate: string; 902 GoVersion: string; 903 Compiler: string; 904 Platform: string; 905 KustomizeVersion: string; 906 HelmVersion: string; 907 KubectlVersion: string; 908 JsonnetVersion: string; 909 } 910 911 export interface Token { 912 id: string; 913 issuedAt: number; 914 expiresAt: number; 915 } 916 917 export interface Account { 918 name: string; 919 enabled: boolean; 920 capabilities: string[]; 921 tokens: Token[]; 922 } 923 924 export interface GnuPGPublicKey { 925 keyID?: string; 926 fingerprint?: string; 927 subType?: string; 928 owner?: string; 929 keyData?: string; 930 } 931 932 export interface GnuPGPublicKeyList extends ItemsList<GnuPGPublicKey> {} 933 934 // https://kubernetes.io/docs/reference/kubectl/overview/#resource-types 935 936 export const ResourceKinds = [ 937 '*', 938 'Binding', 939 'ComponentStatus', 940 'ConfigMap', 941 'Endpoints', 942 'LimitRange', 943 'Namespace', 944 'Node', 945 'PersistentVolumeClaim', 946 'PersistentVolume', 947 'Pod', 948 'PodTemplate', 949 'ReplicationController', 950 'ResourceQuota', 951 'Secret', 952 'ServiceAccount', 953 'Service', 954 'MutatingWebhookConfiguration', 955 'ValidatingWebhookConfiguration', 956 'CustomResourceDefinition', 957 'APIService', 958 'ControllerRevision', 959 'DaemonSet', 960 'Deployment', 961 'ReplicaSet', 962 'StatefulSet', 963 'TokenReview', 964 'LocalSubjectAccessReview', 965 'SelfSubjectAccessReview', 966 'SelfSubjectRulesReview', 967 'SubjectAccessReview', 968 'HorizontalPodAutoscaler', 969 'CronJob', 970 'Job', 971 'CertificateSigningRequest', 972 'Lease', 973 'Event', 974 'Ingress', 975 'NetworkPolicy', 976 'PodDisruptionBudget', 977 'ClusterRoleBinding', 978 'ClusterRole', 979 'RoleBinding', 980 'Role', 981 'PriorityClass', 982 'CSIDriver', 983 'CSINode', 984 'StorageClass', 985 'Volume' 986 ]; 987 988 export const Groups = [ 989 'admissionregistration.k8s.io', 990 'apiextensions.k8s.io', 991 'apiregistration.k8s.io', 992 'apps', 993 'authentication.k8s.io', 994 'authorization.k8s.io', 995 'autoscaling', 996 'batch', 997 'certificates.k8s.io', 998 'coordination.k8s.io', 999 'events.k8s.io', 1000 'extensions', 1001 'networking.k8s.io', 1002 'node.k8s.io', 1003 'policy', 1004 'rbac.authorization.k8s.io', 1005 'scheduling.k8s.io', 1006 'stable.example.com', 1007 'storage.k8s.io' 1008 ]; 1009 1010 export interface HostResourceInfo { 1011 resourceName: ResourceName; 1012 requestedByApp: number; 1013 requestedByNeighbors: number; 1014 capacity: number; 1015 } 1016 1017 export interface Node { 1018 name: string; 1019 systemInfo: NodeSystemInfo; 1020 resourcesInfo: HostResourceInfo[]; 1021 labels: {[name: string]: string}; 1022 } 1023 1024 export interface NodeSystemInfo { 1025 architecture: string; 1026 operatingSystem: string; 1027 kernelVersion: string; 1028 } 1029 1030 export enum ResourceName { 1031 ResourceCPU = 'cpu', 1032 ResourceMemory = 'memory', 1033 ResourceStorage = 'storage' 1034 } 1035 1036 export interface Pod extends ResourceNode { 1037 fullName: string; 1038 metadata: models.ObjectMeta; 1039 spec: PodSpec; 1040 health: HealthStatusCode; 1041 } 1042 1043 export interface PodSpec { 1044 nodeName: string; 1045 } 1046 1047 export enum PodPhase { 1048 PodPending = 'Pending', 1049 PodRunning = 'Running', 1050 PodSucceeded = 'Succeeded', 1051 PodFailed = 'Failed', 1052 PodUnknown = 'Unknown' 1053 } 1054 1055 export interface NotificationChunk { 1056 name: string; 1057 } 1058 1059 export interface LinkInfo { 1060 title: string; 1061 url: string; 1062 description?: string; 1063 iconClass?: string; 1064 } 1065 1066 export interface LinksResponse { 1067 items: LinkInfo[]; 1068 } 1069 1070 export interface UserMessages { 1071 appName: string; 1072 msgKey: string; 1073 display: boolean; 1074 condition?: HealthStatusCode; 1075 duration?: number; 1076 animation?: string; 1077 } 1078 1079 export const AppDeletionConfirmedAnnotation = 'argocd.argoproj.io/deletion-approved'; 1080 1081 export interface ApplicationSetSpec { 1082 strategy?: { 1083 type: 'AllAtOnce' | 'RollingSync'; 1084 rollingSync?: { 1085 steps: Array<{ 1086 matchExpressions: Array<{ 1087 key: string; 1088 operator: string; 1089 values: string[]; 1090 }>; 1091 maxUpdate: number; 1092 }>; 1093 }; 1094 }; 1095 } 1096 1097 export interface ApplicationSetCondition { 1098 type: string; 1099 status: string; 1100 message: string; 1101 lastTransitionTime: string; 1102 reason: string; 1103 } 1104 1105 export interface ApplicationSetResource { 1106 group: string; 1107 version: string; 1108 kind: string; 1109 name: string; 1110 namespace: string; 1111 status: string; 1112 health?: { 1113 status: string; 1114 lastTransitionTime: models.Time; 1115 }; 1116 labels?: {[key: string]: string}; 1117 } 1118 1119 export interface ApplicationSet { 1120 apiVersion?: string; 1121 kind?: string; 1122 metadata: models.ObjectMeta; 1123 spec: ApplicationSetSpec; 1124 status?: { 1125 conditions?: ApplicationSetCondition[]; 1126 applicationStatus?: Array<{ 1127 application: string; 1128 status: 'Waiting' | 'Pending' | 'Progressing' | 'Healthy'; 1129 message?: string; 1130 lastTransitionTime?: string; 1131 step?: string; 1132 targetRevisions?: string[]; 1133 }>; 1134 resources?: ApplicationSetResource[]; 1135 }; 1136 } 1137 1138 export interface ApplicationSetList { 1139 metadata: models.ListMeta; 1140 items: ApplicationSet[]; 1141 }