You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/kubernetes/models/history/models.js

32 lines
1.6 KiB

export const KubernetesSystem_DefaultDeploymentUniqueLabelKey = 'pod-template-hash';
export const KubernetesSystem_RevisionAnnotation = 'deployment.kubernetes.io/revision';
export const KubernetesSystem_RevisionHistoryAnnotation = 'deployment.kubernetes.io/revision-history';
export const KubernetesSystem_DesiredReplicasAnnotation = 'deployment.kubernetes.io/desired-replicas';
export const KubernetesSystem_MaxReplicasAnnotation = 'deployment.kubernetes.io/max-replicas';
// annotationsToSkip lists the annotations that should be preserved from the deployment and not
// copied from the replicaset when rolling a deployment back
// var annotationsToSkip = map[string]bool{
// corev1.LastAppliedConfigAnnotation: true,
// deploymentutil.RevisionAnnotation: true,
// deploymentutil.RevisionHistoryAnnotation: true,
// deploymentutil.DesiredReplicasAnnotation: true,
// deploymentutil.MaxReplicasAnnotation: true,
// appsv1.DeprecatedRollbackTo: true,
// }
// LastAppliedConfigAnnotation is the annotation used to store the previous
// configuration of a resource for use in a three way diff by UpdateApplyAnnotation.
const LastAppliedConfigAnnotation = 'kubectl.kubernetes.io/last-applied-configuration';
const DeprecatedRollbackTo = 'deprecated.deployment.rollback.to';
export const KubernetesSystem_AnnotationsToSkip = {
[LastAppliedConfigAnnotation]: true,
[KubernetesSystem_RevisionAnnotation]: true,
[KubernetesSystem_RevisionHistoryAnnotation]: true,
[KubernetesSystem_DesiredReplicasAnnotation]: true,
[KubernetesSystem_MaxReplicasAnnotation]: true,
[DeprecatedRollbackTo]: true,
};