Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: v0.1.4 #38

Merged
merged 2 commits into from
Aug 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ dev/
*.tar*
bin/
vendor/
bottlerocket-update-operator
31 changes: 30 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# 0.1.4

* Use bottlerocket update API to drive updates [#35] [#39]

To use the update API, nodes must be labeled with the `2.0.0` interface version:

```
bottlerocket.aws/updater-interface-version=2.0.0
```

To configure the use of the update API on all nodes in a cluster:

1. Ensure desired nodes are on bottlerocket `v0.4.1` or later

2. Set the `updater-interface-version` to `2.0.0` on nodes:

```bash
kubectl label node --overwrite=true $(kubectl get nodes -o jsonpath='{.items[*].metadata.name}') bottlerocket.aws/updater-interface-version=2.0.0
```

* Add SELinux process label allowing API accesses by agent [#40]

* Fix deduplication filter in cases that could deadlock agent [#41]

[#35]: https://github.com/bottlerocket-os/bottlerocket-update-operator/pull/35
[#39]: https://github.com/bottlerocket-os/bottlerocket-update-operator/pull/39
[#40]: https://github.com/bottlerocket-os/bottlerocket-update-operator/pull/40
[#41]: https://github.com/bottlerocket-os/bottlerocket-update-operator/pull/41

# 0.1.3

* Add missing backtick in README instructions ([#25])
Expand Down Expand Up @@ -30,4 +59,4 @@ kubectl label nodes --all "bottlerocket.aws/platform-version"-

Initial release of **bottlerocket-update-operator** - a Kubernetes operator that coordinates Bottlerocket updates on hosts in a cluster..

See the [README](README.md) for additional information.
See the [README](README.md) for additional information.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ SHORT_SHA = $(shell git describe --abbrev=8 --always --dirty='-dev' --exclude '*
# image, it is appended to the IMAGE_NAME unless the name is specified.
IMAGE_ARCH_SUFFIX = $(addprefix -,$(ARCH))
# BUILDSYS_SDK_IMAGE is the Bottlerocket SDK image used for license scanning.
BUILDSYS_SDK_IMAGE ?= bottlerocket/sdk-x86_64:v0.10.1
BUILDSYS_SDK_IMAGE ?= bottlerocket/sdk-$(UNAME_ARCH):v0.10.1
# LICENSES_IMAGE_NAME is the name of the container image that has LICENSE files
# for distribution.
LICENSES_IMAGE = $(IMAGE_NAME)-licenses
# DESTDIR is where the release artifacts will be written.
DESTDIR = .
# DISTFILE is the path to the dist target's output file - the container image
# tarball.
DISTFILE = $(DESTDIR:/=)/$(subst /,_,$(IMAGE_NAME)).tar.gz
DISTFILE ?= $(patsubst %/,%,$(DESTDIR))/$(subst /,_,$(IMAGE_NAME)).tar.gz

# These values derive ARCH and DOCKER_ARCH which are needed by dependencies in
# image build defaulting to system's architecture when not specified.
Expand Down Expand Up @@ -58,16 +58,20 @@ all: build test container check

# Build the daemon and tools into GOBIN
build:
go install -v $(GOPKG)
go build -v -o $(GOBIN)/bottlerocket-update-operator .

# Run Go tests for daemon and tools.
#
# Tests run only with the native GOARCH of the system.
test: GOARCH=
test: GO_TEST_FLAGS += -v -x
# Use debuggable build to capture more logging for diagnosing failing tests.
test: GO_LDFLAGS +=-X $(GOPKG)/pkg/logging.DebugEnable=true
test:
go test -race -ldflags '$(GO_LDFLAGS)' $(GOPKGS)
go test $(GO_TEST_FLAGS) -ldflags '$(GO_LDFLAGS)' $(GOPKGS)

test-race: GO_TEST_FLAGS += -race
test-race: test

# Build a container image for daemon and tools.
container: licenses
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.1.3
v0.1.4
2 changes: 2 additions & 0 deletions dev/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ spec:
operator: In
values:
- amd64
- arm64
# Avoid update-operator's Agent Pods if possible.
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand Down Expand Up @@ -162,6 +163,7 @@ spec:
operator: In
values:
- amd64
- arm64
hostPID: true
containers:
- name: agent
Expand Down
15 changes: 8 additions & 7 deletions update-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ spec:
operator: In
values:
- amd64
- arm64
# Avoid update-operator's Agent Pods if possible.
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand All @@ -117,8 +118,7 @@ spec:
values: ["agent"]
containers:
- name: controller
# TODO Update this field to the new version that supports update API once that's released
image: "328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-update-operator:v0.1.3"
image: "328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-update-operator:v0.1.4"
imagePullPolicy: Always
args:
- -controller
Expand All @@ -130,8 +130,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
# This DaemonSet is for Bottlerocket hosts that support updates through the Bottlerocket API
---
# This DaemonSet is for Bottlerocket hosts that support updates through the Bottlerocket API
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down Expand Up @@ -166,11 +166,11 @@ spec:
operator: In
values:
- amd64
- arm64
hostPID: true
containers:
- name: agent
# TODO Update this field to the new version that supports update API once that's released
image: "328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-update-operator:v0.1.3"
image: "328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-update-operator:v0.1.4"
imagePullPolicy: Always
args:
- -agent
Expand Down Expand Up @@ -202,8 +202,8 @@ spec:
hostPath:
path: /run/api.sock
type: Socket
# This DaemonSet is for Bottlerocket hosts that can only support updates through updog
---
# This DaemonSet is for Bottlerocket hosts that can only support updates through updog
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down Expand Up @@ -238,10 +238,11 @@ spec:
operator: In
values:
- amd64
- arm64
hostPID: true
containers:
- name: agent
image: "328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-update-operator:v0.1.3"
image: "328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-update-operator:v0.1.4"
imagePullPolicy: Always
# XXX: tty required to exec binaries that use `simplelog` until https://github.com/bottlerocket-os/bottlerocket/issues/576 is resolved.
tty: true
Expand Down