Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Commit

Permalink
Merge pull request #36 from mischief/finalize-anno-label
Browse files Browse the repository at this point in the history
update prefix and document annotation/labels
  • Loading branch information
mischief authored Jan 10, 2017
2 parents 3fa9cb7 + 55c373c commit 40fffc5
Showing 1 changed file with 44 additions and 10 deletions.
54 changes: 44 additions & 10 deletions internal/constants/constants.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,49 @@
// Package constants has Kubernetes label and annotation constants shared by
// klocksmith and klocksmith-controller.
// the update-agent and update-operator.
package constants

const (
LabelPrefix = "alpha.coreos.com/update1."
LabelRebootNeeded = LabelPrefix + "reboot-needed"
LabelRebootInProgress = LabelPrefix + "reboot-in-progress"
LabelOkToReboot = LabelPrefix + "reboot-ok"

AnnotationPrefix = LabelPrefix
AnnotationID = AnnotationPrefix + "id"
AnnotationGroup = AnnotationPrefix + "group"
AnnotationVersion = AnnotationPrefix + "version"
// Annotation values used by update-agent and update-operator
True = "true"
False = "false"

// Prefix used by all label and annotation keys.
Prefix = "container-linux-update.v1.coreos.com/"

// Key set to "true" by the update-agent when a reboot is requested.
LabelRebootNeeded = Prefix + "reboot-needed"

// Key set to "true" by the update-agent when node-drain and reboot is
// initiated.
LabelRebootInProgress = Prefix + "reboot-in-progress"

// Key set to "true" by the update-operator when an agent may proceed
// with a node-drain and reboot.
LabelOkToReboot = Prefix + "reboot-ok"

// Key set by the update-agent to the value of "ID" in /etc/os-release.
AnnotationID = Prefix + "id"

// Key set by the update-agent to the value of "GROUP" in
// /usr/share/coreos/update.conf, overridden by the value of "GROUP" in
// /etc/coreos/update.conf.
AnnotationGroup = Prefix + "group"

// Key set by the update-agent to the value of "VERSION" in /etc/os-release.
AnnotationVersion = Prefix + "version"

// Key set by the update-agent to the current operator status of update_agent.
//
// Possible values are:
// - "UPDATE_STATUS_IDLE"
// - "UPDATE_STATUS_CHECKING_FOR_UPDATE"
// - "UPDATE_STATUS_UPDATE_AVAILABLE"
// - "UPDATE_STATUS_DOWNLOADING"
// - "UPDATE_STATUS_VERIFYING"
// - "UPDATE_STATUS_FINALIZING"
// - "UPDATE_STATUS_UPDATED_NEED_REBOOT"
// - "UPDATE_STATUS_REPORTING_ERROR_EVENT"
//
// It is possible, but extremely unlike for it to be "unknown status".
AnnotationStatus = Prefix + "status"
)

0 comments on commit 40fffc5

Please sign in to comment.