This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/update-operator'
- Loading branch information
Showing
16 changed files
with
284 additions
and
45 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
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
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
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,16 +1,19 @@ | ||
// todo: ha, return nb address | ||
output "public_ip_address" { | ||
depends_on = ["linode_instance.instance.0"] | ||
value = "${element(concat(linode_instance.instance.*.ip_address, list("")), 0)}" | ||
depends_on = ["linode_instance.instance.0"] | ||
description = "Public IP Address of the first instance in the group" | ||
value = "${element(concat(linode_instance.instance.*.ip_address, list("")), 0)}" | ||
} | ||
|
||
// todo: this doesnt make sense in ha -- return all? | ||
output "private_ip_address" { | ||
depends_on = ["linode_instance.instance.0"] | ||
value = "${element(concat(linode_instance.instance.*.private_ip_address, list("")), 0)}" | ||
description = "Private IP Address of the first instance in the group" | ||
depends_on = ["linode_instance.instance.0"] | ||
value = "${element(concat(linode_instance.instance.*.private_ip_address, list("")), 0)}" | ||
} | ||
|
||
output "nodes_public_ip" { | ||
depends_on = ["linode_instance.instance.*"] | ||
value = "${concat(linode_instance.instance.*.ip_address)}" | ||
depends_on = ["linode_instance.instance.*"] | ||
description = "Public IP Address of the instance(s)" | ||
value = "${concat(linode_instance.instance.*.ip_address)}" | ||
} |
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,6 +1,3 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# TODO: https://github.com/coreos/container-linux-update-operator | ||
# systemctl start update-engine | ||
|
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
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
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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
# TODO swap these for helm charts | ||
|
||
kubectl apply -f /home/core/init/update-operator.yaml |
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
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 |
---|---|---|
@@ -0,0 +1,153 @@ | ||
# xref: https://raw.githubusercontent.com/coreos/container-linux-update-operator/master/examples/deploy/00-namespace.yaml | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: reboot-coordinator | ||
--- | ||
# xref: https://raw.githubusercontent.com/coreos/container-linux-update-operator/master/examples/deploy/update-operator.yaml | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: container-linux-update-operator | ||
namespace: reboot-coordinator | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: container-linux-update-operator | ||
spec: | ||
containers: | ||
- name: update-operator | ||
image: quay.io/coreos/container-linux-update-operator:v0.7.0 | ||
command: | ||
- "/bin/update-operator" | ||
env: | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
tolerations: | ||
- key: node-role.kubernetes.io/master | ||
operator: Exists | ||
effect: NoSchedule | ||
--- | ||
# xref: https://raw.githubusercontent.com/coreos/container-linux-update-operator/master/examples/deploy/update-agent.yaml | ||
apiVersion: extensions/v1beta1 | ||
kind: DaemonSet | ||
metadata: | ||
name: container-linux-update-agent | ||
namespace: reboot-coordinator | ||
spec: | ||
updateStrategy: | ||
type: RollingUpdate | ||
rollingUpdate: | ||
maxUnavailable: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: container-linux-update-agent | ||
spec: | ||
containers: | ||
- name: update-agent | ||
image: quay.io/coreos/container-linux-update-operator:v0.7.0 | ||
command: | ||
- "/bin/update-agent" | ||
volumeMounts: | ||
- mountPath: /var/run/dbus | ||
name: var-run-dbus | ||
- mountPath: /etc/coreos | ||
name: etc-coreos | ||
- mountPath: /usr/share/coreos | ||
name: usr-share-coreos | ||
- mountPath: /etc/os-release | ||
name: etc-os-release | ||
env: | ||
# read by update-agent as the node name to manage reboots for | ||
- name: UPDATE_AGENT_NODE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
tolerations: | ||
- key: node-role.kubernetes.io/master | ||
operator: Exists | ||
effect: NoSchedule | ||
volumes: | ||
- name: var-run-dbus | ||
hostPath: | ||
path: /var/run/dbus | ||
- name: etc-coreos | ||
hostPath: | ||
path: /etc/coreos | ||
- name: usr-share-coreos | ||
hostPath: | ||
path: /usr/share/coreos | ||
- name: etc-os-release | ||
hostPath: | ||
path: /etc/os-release | ||
--- | ||
# xref: https://raw.githubusercontent.com/coreos/container-linux-update-operator/master/examples/deploy/rbac/cluster-role.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRole | ||
metadata: | ||
name: reboot-coordinator | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- nodes | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- update | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
verbs: | ||
- create | ||
- get | ||
- update | ||
- list | ||
- watch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- events | ||
verbs: | ||
- create | ||
- watch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
verbs: | ||
- get | ||
- list | ||
- delete | ||
- apiGroups: | ||
- "extensions" | ||
resources: | ||
- daemonsets | ||
verbs: | ||
- get | ||
--- | ||
# xref: https://raw.githubusercontent.com/coreos/container-linux-update-operator/master/examples/deploy/rbac/cluster-role-binding.yaml | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
metadata: | ||
name: reboot-coordinator | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: reboot-coordinator | ||
subjects: | ||
- kind: ServiceAccount | ||
namespace: reboot-coordinator | ||
name: default | ||
|
Oops, something went wrong.