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

Update host containers #3911

Merged
merged 4 commits into from
Apr 25, 2024

Conversation

vyaghras
Copy link
Contributor

@vyaghras vyaghras commented Apr 25, 2024

Description of changes:
Update the admin and control host containers to bottlerocket-admin-container v0.11.7 and bottlerocket-control-container v0.7.11. Also add migrations move to these versions on upgrade.

Testing done:

  • cargo make check-migrations
  • Build Bottlerocket AMI and check the version via API Client
apiclient get settings.host-containers
{
  "settings": {
    "host-containers": {
      "admin": {
        "enabled": true,
        "source": "**********.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.11.7",
        "superpowered": true,
        "user-data": "***********"
      },
      "control": {
        "enabled": true,
        "source": "*********.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-control:v0.7.11",
        "superpowered": false
      }
    }
  }
}
  • Test migration from v1.19.4 to v1.19.5, host container versions are correctly picked up. (Same output as above)
apiclient get os
{
  "os": {
    "arch": "x86_64",
    "build_id": "d2ac549f-dirty",
    "pretty_name": "Bottlerocket OS 1.19.5 (aws-k8s-1.29)",
    "variant_id": "aws-k8s-1.29",
    "version_id": "1.19.5"
  }
}
apiclient get settings.host-containers
{
  "settings": {
    "host-containers": {
      "admin": {
        "enabled": true,
        "source": "******.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.11.7",
        "superpowered": true,
        "user-data": "******"
      },
      "control": {
        "enabled": true,
        "source": "******.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-control:v0.7.11",
        "superpowered": false
      }
    }
  }
}
  • Test rollback to v1.19.5 from v1.19.4.
apiclient get os
{
  "os": {
    "arch": "x86_64",
    "build_id": "4f0a078e",
    "pretty_name": "Bottlerocket OS 1.19.4 (aws-k8s-1.29)",
    "variant_id": "aws-k8s-1.29",
    "version_id": "1.19.4"
  }
}
apiclient get settings.host-containers
{
  "settings": {
    "host-containers": {
      "admin": {
        "enabled": true,
        "source": "****.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.11.6",
        "superpowered": true,
        "user-data": "*****"
      },
      "control": {
        "enabled": true,
        "source": "****.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-control:v0.7.10",
        "superpowered": false
      }
    }
  }
}

**Terms of contribution:**

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Copy link
Contributor

@monirul monirul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not expose the user data in the PR description. This can leak sensitive data. For example, your user data actually contains ssh key details.
{"ssh":{"authorized-keys":["ssh-rsa AAAAB3NzaC1yc2EAAAADAQA... vyaghras-us-west-2"]}}%

technically speaking your key is compromised. It would be better if you revoke the key.

@yeazelm
Copy link
Contributor

yeazelm commented Apr 25, 2024

@monirul "ssh-rsa AAAAB3NzaC1yc2EAAAADAQA... vyaghras-us-west-2 is a public key. It is not compromised but nonetheless this is a good idea to avoid publishing specifics from user data in these reivews.

@vyaghras
Copy link
Contributor Author

⬆️ Fix the build error for Cargo fmt

Copy link
Contributor

@yeazelm yeazelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vyaghras vyaghras merged commit 5edcd0a into bottlerocket-os:develop Apr 25, 2024
33 checks passed
@vyaghras vyaghras deleted the update_host_containers branch April 25, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants