This repository has been archived by the owner on Sep 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from mischief/finalize-anno-label
update prefix and document annotation/labels
- Loading branch information
Showing
1 changed file
with
44 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
) |