Skip to content
New issue

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

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

Already on GitHub? # to your account

[test] test gzip compression for Flatcar #569

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func setupControllers(mgr manager.Manager, flags flagVars, linodeClientConfig, d

useGzip, err := strconv.ParseBool(os.Getenv("GZIP_COMPRESSION_ENABLED"))
if err != nil {
setupLog.Error(err, "proceeding without gzip compression for cloud-init data")
setupLog.Error(err, "proceeding without gzip compression for user-data")
}

// LinodeMachine Controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ spec:
try:
- assert:
file: assert-capi-resources.yaml
- name: Modify existing CAPI deployment to use GZIP user-data
try:
# TODO: Add operation check
- patch:
file: patch-capl-controller-manager.yaml
- name: Upload Flatcar image
try:
- script:
Expand All @@ -37,10 +42,10 @@ spec:
value: (env('LINODE_REGION'))
content: |
set -e
# Get the latest version on Beta channel.
# NOTE: This can be changed to Stable when Akamai support will come on these channels.
# Get the latest version on Alpha channel.
# NOTE: This can be changed to Beta when Ignition GZIP support for Akamai will come on these channels.
curl -fsSL --remote-name \
https://beta.release.flatcar-linux.net/amd64-usr/current/flatcar_production_akamai_image.bin.gz
https://alpha.release.flatcar-linux.net/amd64-usr/current/flatcar_production_akamai_image.bin.gz

res=$(curl -s --request POST \
--url "https://${TARGET_API}/${TARGET_API_VERSION}/${URI}" \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: capl-controller-manager
namespace: capl-system
spec:
template:
spec:
containers:
- name: manager
env:
- name: GZIP_COMPRESSION_ENABLED
value: "true"