Skip to content

Instantly share code, notes, and snippets.

@yifan-gu
Created March 1, 2017 02:29
Show Gist options
  • Select an option

  • Save yifan-gu/fd642f05bd5420235a82c47512cb6c64 to your computer and use it in GitHub Desktop.

Select an option

Save yifan-gu/fd642f05bd5420235a82c47512cb6c64 to your computer and use it in GitHub Desktop.
check update

Initial state

kubectl get channeloperatorconfig default -o json -n tectonic-system
{
  "apiVersion": "coreos.com/v1",
  "kind": "ChannelOperatorConfig",
  "metadata":{
    "name": "default",
    "namespace": "tectonic-system"
  },
  "server": "https://tectonic.update.core-os.net",
  "channel": "alpha",
  "appID": "6bc7b986-4654-4a0f-94b3-84ce6feb1db4",
  "automaticUpdate": false,
  "triggerUpdate": false,
  "triggerUpdateCheck": false,
  "updateCheckInterval": 2700
}

kubectl get appversion tectonic-cluster -o json -n tectonic-system
{
  "apiVersion": "coreos.com/v1",
  "kind": "AppVersion",
  "metadata": {
    "name": "tectonic-cluster",
    "namespace": "tectonic-system",
    "labels": {
      "managed-by-channel-operator": "true"
    }
  },
  "spec": {
    "desiredVersion": "1.5.2-tectonic.1",
    "paused": false
  },
  "status": {
    "currentVersion": "1.5.2-tectonic.1",
    "paused": false
  }
}

By clicking "Check for updates", we should set triggerUpdateCheck to true in the channeloperatorconfig named by default

Then we should see desiredVersion being updated in appversion of tectonic-cluster:

kubectl get appversion tectonic-cluster -o json -n tectonic-system
{
  "apiVersion": "coreos.com/v1",
  "kind": "AppVersion",
  "metadata": {
    "name": "tectonic-cluster",
    "namespace": "tectonic-system",
    "labels": {
      "managed-by-channel-operator": "true"
    }
  },
  "spec": {
    "desiredVersion": "1.5.3-tectonic.1",
    "paused": false
  },
  "status": {
    "currentVersion": "1.5.2-tectonic.1",
    "paused": false
  }
}

When desiredVersion > currentVersion, we should be able to click start update. which sets a triggerUpdate in the channeloperatorconfig:

kubectl get channeloperatorconfig default -o json -n tectonic-system
{
  "apiVersion": "coreos.com/v1",
  "kind": "ChannelOperatorConfig",
  "metadata":{
    "name": "default",
    "namespace": "tectonic-system"
  },
  "server": "https://tectonic.update.core-os.net",
  "channel": "alpha",
  "appID": "6bc7b986-4654-4a0f-94b3-84ce6feb1db4",
  "automaticUpdate": false,
  "triggerUpdate": true,
  "triggerUpdateCheck": false,
  "updateCheckInterval": 2700
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment