Skip to content

Commit

Permalink
Merge pull request #12230 from richard-cox/fix-cc-annotation
Browse files Browse the repository at this point in the history
Fix Cloud Credential Annotation collection
  • Loading branch information
richard-cox authored Oct 11, 2024
2 parents ceb2931 + da2e938 commit 58fd297
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions shell/config/labels-annotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,4 @@ export const SYSTEM_LABELS = [
'egress.rke2.io'
];

export const CLOUD_CREDENTIALS = [
'rancher.io/expiration-timestamp',
];
export const CLOUD_CREDENTIALS = { EXPIRATION: 'rancher.io/expiration-timestamp' };
2 changes: 1 addition & 1 deletion shell/models/cloudcredential.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export default class CloudCredential extends NormanModel {
}

get expires() {
const expires = this.annotations[CLOUD_CREDENTIALS];
const expires = this.annotations[CLOUD_CREDENTIALS.EXPIRATION];

if (typeof expires === 'string') {
return parseInt(expires);
Expand Down

0 comments on commit 58fd297

Please sign in to comment.