Skip to content

Commit

Permalink
Merge branch 'main' into aws-s3-access-points
Browse files Browse the repository at this point in the history
  • Loading branch information
zeleena authored Apr 4, 2022
2 parents 961d70e + 919102e commit dc84fed
Show file tree
Hide file tree
Showing 85 changed files with 6,664 additions and 187 deletions.
2 changes: 1 addition & 1 deletion .copr/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
srpm:
dnf install -y git
curl -LO https://src.fedoraproject.org/rpms/ignition/raw/rawhide/f/ignition.spec
curl -LOf https://src.fedoraproject.org/rpms/ignition/raw/rawhide/f/ignition.spec
version=$$(git describe --always --tags | sed -e 's,-,\.,g' -e 's,^v,,'); \
git archive --format=tar --prefix=ignition-$$version/ HEAD | gzip > ignition-$$version.tar.gz; \
sed -ie "s,^Version:.*,Version: $$version," ignition.spec
Expand Down
36 changes: 31 additions & 5 deletions .github/ISSUE_TEMPLATE/release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,35 @@ Tagging:
- [ ] Run `./tag_release.sh <vX.Y.z> <git commit hash>`
- [ ] Push that tag to GitHub

Packaging:
Fedora packaging:
- [ ] Update the Ignition spec file in [Fedora](https://src.fedoraproject.org/rpms/ignition):
- Bump the `Version`
- Switch the `Release` back to `1%{?dist}`
- Remove any patches obsoleted by the new release
- Run `go-mods-to-bundled-provides.py | sort` while inside of the Ignition directory you ran `./tag_release` from & copy output into spec file in `# Main package provides` section
- Update change log
- Update changelog
- [ ] Run `spectool -g -S ignition.spec`
- [ ] Run `kinit [email protected]`
- [ ] Run `fedpkg new-sources tarball-name`
- [ ] PR the changes in [Fedora](https://src.fedoraproject.org/rpms/ignition)
- [ ] Once the PR merges to rawhide, merge rawhide into the other relevant branches (e.g. f30) then push those
- [ ] Once the PR merges to rawhide, merge rawhide into the other relevant branches (e.g. f35) then push those, for example:
```bash
git checkout rawhide
git pull --ff-only
git checkout f35
git merge --ff-only rawhide
git push origin f35
```
- [ ] On each of those branches run `fedpkg build`
- [ ] Once the builds have finished, submit them to [bodhi](https://bodhi.fedoraproject.org/updates/new), filling in:
- `ignition` for `Packages`
- Selecting the build(s) that just completed, except for the rawhide one (which gets submitted automatically)
- Writing brief release notes like "New upstream release. See release notes at `link to NEWS on GH tag`"
- Writing brief release notes like "New upstream release; see release notes at `link to GitHub release`"
- Leave `Update name` blank
- `Type`, `Severity` and `Suggestion` can be left as `unspecified` unless it is a security release. In that case select `security` which the appropriate severity.
- `Type`, `Severity` and `Suggestion` can be left as `unspecified` unless it is a security release. In that case select `security` with the appropriate severity.
- `Stable karma` and `Unstable` karma can be set to `2` and `-1`, respectively.
- [ ] [Submit a fast-track](https://github.com/coreos/fedora-coreos-config/actions/workflows/add-override.yml) for FCOS testing-devel
- [ ] [Submit a fast-track](https://github.com/coreos/fedora-coreos-config/actions/workflows/add-override.yml) for FCOS next-devel if it is [open](https://github.com/coreos/fedora-coreos-pipeline/blob/main/next-devel/README.md)

GitHub release:
- [ ] Wait until the Bodhi update shows "Signed :heavy_check_mark:" in the Metadata box.
Expand All @@ -48,3 +57,20 @@ GitHub release:
Quay release:
- [ ] Visit the [Quay tags page](https://quay.io/repository/coreos/ignition-validate?tab=tags) and wait for a versioned tag to appear
- [ ] Click the gear next to the tag, select "Add New Tag", enter `release`, and confirm

RHCOS packaging for the current RHCOS development release:
- [ ] Update the Ignition spec file
- Bump the `Version`
- Switch the `Release` back to `1%{?dist}`
- Remove any patches obsoleted by the new release
- Run `go-mods-to-bundled-provides.py | sort` while inside of the Ignition directory you ran `./tag_release` from & copy output into spec file in `# Main package provides` section
- Update changelog
- [ ] Run `spectool -g -S ignition.spec`
- [ ] Run `kinit [email protected]`
- [ ] Run `rhpkg new-sources tarball-name`
- [ ] PR the changes
- [ ] Get the PR reviewed and merge it
- [ ] Update your local repo and run `rhpkg build`

CentOS Stream 9 packaging:
- [ ] To be written
18 changes: 16 additions & 2 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,32 @@ name: Container
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]

permissions:
contents: read

# avoid races when pushing containers built from main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
build-container:
name: Build container image
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Build container image
run: podman build -f Dockerfile.validate .
with:
# fetch tags so the compiled-in version number is useful
fetch-depth: 0
- name: Build and push container
uses: coreos/actions-lib/build-container@main
with:
credentials: ${{ secrets.QUAY_AUTH }}
file: Dockerfile.validate
push: quay.io/coreos/ignition-validate
# Speed up PR CI by skipping arm64
pr-arches: amd64
10 changes: 6 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: test build
strategy:
matrix:
go-version: [1.15.x, 1.16.x, 1.17.x]
go-version: [1.15.x, 1.16.x, 1.17.x, 1.18.x]
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
Expand All @@ -24,19 +24,21 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install libblkid-dev
run: sudo apt-get install libblkid-dev
run: |
sudo apt-get update
sudo apt-get install libblkid-dev
- name: Run tests
run: ./test
- name: Run linter
uses: golangci/golangci-lint-action@v2
with:
version: v1.42.0
version: v1.45.0
args: -E=gofmt --timeout=30m0s
test-validate:
name: test ignition-validate
strategy:
matrix:
go-version: [1.17.x]
go-version: [1.18.x]
os: [macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.validate
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM registry.fedoraproject.org/fedora:35 AS builder
RUN dnf install -y golang git
RUN dnf install -y golang git-core
RUN mkdir /ignition-validate
COPY . /ignition-validate
WORKDIR /ignition-validate
Expand Down
1 change: 0 additions & 1 deletion build_for_container
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ export GO11MODULE=on
export CGO_ENABLED=0
export GOFLAGS='-mod=vendor'
export GOOS=linux
export GOARCH=amd64

go build -ldflags "${GLDFLAGS}" -o ${BIN_PATH}/ignition-validate ${REPO_PATH}/validate
5 changes: 2 additions & 3 deletions config/v3_1/types/headers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package types

import (
"strings"
"testing"

"github.com/coreos/ignition/v2/config/shared/errors"
Expand Down Expand Up @@ -133,7 +132,7 @@ func TestValidHeadersParse(t *testing.T) {
if err != nil {
t.Errorf("error during parsing valid headers: %v", err)
}
if !equal(parseHeaders[strings.Title("header1")], []string{"header1value"}) || !equal(parseHeaders[strings.Title("header2")], []string{"header2value"}) {
if !equal(parseHeaders["Header1"], []string{"header1value"}) || !equal(parseHeaders["Header2"], []string{"header2value"}) {
t.Errorf("parsed HTTP headers values are wrong")
}
}
Expand All @@ -154,7 +153,7 @@ func TestDuplicateHeadersParse(t *testing.T) {
if err != nil {
t.Errorf("error during parsing valid headers: %v", err)
}
if !equal(parseHeaders[strings.Title("header1")], []string{"header1value", "header2value"}) {
if !equal(parseHeaders["Header1"], []string{"header1value", "header2value"}) {
t.Errorf("parsed HTTP headers values are wrong")
}
}
5 changes: 2 additions & 3 deletions config/v3_2/types/headers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package types

import (
"strings"
"testing"

"github.com/coreos/ignition/v2/config/shared/errors"
Expand Down Expand Up @@ -133,7 +132,7 @@ func TestValidHeadersParse(t *testing.T) {
if err != nil {
t.Errorf("error during parsing valid headers: %v", err)
}
if !equal(parseHeaders[strings.Title("header1")], []string{"header1value"}) || !equal(parseHeaders[strings.Title("header2")], []string{"header2value"}) {
if !equal(parseHeaders["Header1"], []string{"header1value"}) || !equal(parseHeaders["Header2"], []string{"header2value"}) {
t.Errorf("parsed HTTP headers values are wrong")
}
}
Expand All @@ -154,7 +153,7 @@ func TestDuplicateHeadersParse(t *testing.T) {
if err != nil {
t.Errorf("error during parsing valid headers: %v", err)
}
if !equal(parseHeaders[strings.Title("header1")], []string{"header1value", "header2value"}) {
if !equal(parseHeaders["Header1"], []string{"header1value", "header2value"}) {
t.Errorf("parsed HTTP headers values are wrong")
}
}
5 changes: 2 additions & 3 deletions config/v3_3/types/headers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package types

import (
"strings"
"testing"

"github.com/coreos/ignition/v2/config/shared/errors"
Expand Down Expand Up @@ -133,7 +132,7 @@ func TestValidHeadersParse(t *testing.T) {
if err != nil {
t.Errorf("error during parsing valid headers: %v", err)
}
if !equal(parseHeaders[strings.Title("header1")], []string{"header1value"}) || !equal(parseHeaders[strings.Title("header2")], []string{"header2value"}) {
if !equal(parseHeaders["Header1"], []string{"header1value"}) || !equal(parseHeaders["Header2"], []string{"header2value"}) {
t.Errorf("parsed HTTP headers values are wrong")
}
}
Expand All @@ -154,7 +153,7 @@ func TestDuplicateHeadersParse(t *testing.T) {
if err != nil {
t.Errorf("error during parsing valid headers: %v", err)
}
if !equal(parseHeaders[strings.Title("header1")], []string{"header1value", "header2value"}) {
if !equal(parseHeaders["Header1"], []string{"header1value", "header2value"}) {
t.Errorf("parsed HTTP headers values are wrong")
}
}
5 changes: 2 additions & 3 deletions config/v3_4_experimental/types/headers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package types

import (
"strings"
"testing"

"github.com/coreos/ignition/v2/config/shared/errors"
Expand Down Expand Up @@ -133,7 +132,7 @@ func TestValidHeadersParse(t *testing.T) {
if err != nil {
t.Errorf("error during parsing valid headers: %v", err)
}
if !equal(parseHeaders[strings.Title("header1")], []string{"header1value"}) || !equal(parseHeaders[strings.Title("header2")], []string{"header2value"}) {
if !equal(parseHeaders["Header1"], []string{"header1value"}) || !equal(parseHeaders["Header2"], []string{"header2value"}) {
t.Errorf("parsed HTTP headers values are wrong")
}
}
Expand All @@ -154,7 +153,7 @@ func TestDuplicateHeadersParse(t *testing.T) {
if err != nil {
t.Errorf("error during parsing valid headers: %v", err)
}
if !equal(parseHeaders[strings.Title("header1")], []string{"header1value", "header2value"}) {
if !equal(parseHeaders["Header1"], []string{"header1value", "header2value"}) {
t.Errorf("parsed HTTP headers values are wrong")
}
}
2 changes: 2 additions & 0 deletions docs/supported-platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Ignition is currently only supported for the following platforms:
* [Exoscale] (`exoscale`) - Ignition will read its configuration from the instance userdata. Cloud SSH keys are handled separately.
* [Google Cloud] (`gcp`) - Ignition will read its configuration from the instance metadata entry named "user-data". Cloud SSH keys are handled separately.
* [IBM Cloud] (`ibmcloud`) - Ignition will read its configuration from the instance userdata. Cloud SSH keys are handled separately.
* [KubeVirt] (`kubevirt`) - Ignition will read its configuration from the instance userdata via config drive. Cloud SSH keys are handled separately.
* Bare Metal (`metal`) - Use the `ignition.config.url` kernel parameter to provide a URL to the configuration. The URL can use the `http://`, `https://`, `tftp://`, `s3://`, `arn:`, or `gs://` schemes to specify a remote config.
* [Nutanix] (`nutanix`) - Ignition will read its configuration from the instance userdata via config drive. Cloud SSH keys are handled separately.
* [OpenStack] (`openstack`) - Ignition will read its configuration from the instance userdata via either metadata service or config drive. Cloud SSH keys are handled separately.
Expand All @@ -41,6 +42,7 @@ For most cloud providers, cloud SSH keys and custom network configuration are ha
[Exoscale]: https://www.exoscale.com/compute/
[Google Cloud]: https://cloud.google.com/compute
[IBM Cloud]: https://www.ibm.com/cloud/vpc
[KubeVirt]: https://kubevirt.io
[Nutanix]: https://www.nutanix.com/products/ahv
[OpenStack]: https://www.openstack.org/
[Equinix Metal]: https://metal.equinix.com/product/
Expand Down
2 changes: 1 addition & 1 deletion dracut/30ignition/ignition-disks.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Unit]
Description=Ignition (disks)
Documentation=https://github.com/coreos/ignition
Documentation=https://coreos.github.io/ignition/
ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target
Expand Down
2 changes: 1 addition & 1 deletion dracut/30ignition/ignition-fetch-offline.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[Unit]
Description=Ignition (fetch-offline)
Documentation=https://github.com/coreos/ignition
Documentation=https://coreos.github.io/ignition/
ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target
Expand Down
2 changes: 1 addition & 1 deletion dracut/30ignition/ignition-fetch.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Unit]
Description=Ignition (fetch)
Documentation=https://github.com/coreos/ignition
Documentation=https://coreos.github.io/ignition/
ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target
Expand Down
2 changes: 1 addition & 1 deletion dracut/30ignition/ignition-files.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Unit]
Description=Ignition (files)
Documentation=https://github.com/coreos/ignition
Documentation=https://coreos.github.io/ignition/
ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target
Expand Down
2 changes: 1 addition & 1 deletion dracut/30ignition/ignition-kargs.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Unit]
Description=Ignition (kargs)
Documentation=https://github.com/coreos/ignition
Documentation=https://coreos.github.io/ignition/
ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target
Expand Down
2 changes: 1 addition & 1 deletion dracut/30ignition/ignition-mount.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Unit]
Description=Ignition (mount)
Documentation=https://github.com/coreos/ignition
Documentation=https://coreos.github.io/ignition/
ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target
Expand Down
2 changes: 1 addition & 1 deletion dracut/30ignition/ignition-remount-sysroot.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Unit]
Description=Remount /sysroot read-write for Ignition
Documentation=https://github.com/coreos/ignition
Documentation=https://coreos.github.io/ignition/
ConditionPathExists=/etc/initrd-release
# Some Linux Distributions don't pass a rw option on the kernel
# commandline and thus mount the root filesystem ro by default. In
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ require (
github.com/google/uuid v1.1.1
github.com/pin/tftp v2.1.0+incompatible
github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa // indirect
github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace
github.com/stretchr/testify v1.7.0
github.com/vincent-petithory/dataurl v1.0.0
github.com/vmware/vmw-guestinfo v0.0.0-20170707015358-25eff159a728
github.com/vmware/vmw-guestinfo v0.0.0-20220317130741-510905f0efa3
github.com/vmware/vmw-ovflib v0.0.0-20170608004843-1f217b9dc714
go.opencensus.io v0.22.5 // indirect
golang.org/x/net v0.0.0-20200602114024-627f9648deb9
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,17 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykE
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa h1:E+gaaifzi2xF65PbDmuKI3PhLWY6G5opMLniFq8vmXA=
github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU=
github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace h1:9PNP1jnUjRhfmGMlkXHjYPishpcw4jpSt/V/xYY3FMA=
github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/vincent-petithory/dataurl v1.0.0 h1:cXw+kPto8NLuJtlMsI152irrVw9fRDX8AbShPRpg2CI=
github.com/vincent-petithory/dataurl v1.0.0/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U=
github.com/vmware/vmw-guestinfo v0.0.0-20170707015358-25eff159a728 h1:sH9mEk+flyDxiUa5BuPiuhDETMbzrt9A20I2wktMvRQ=
github.com/vmware/vmw-guestinfo v0.0.0-20170707015358-25eff159a728/go.mod h1:x9oS4Wk2s2u4tS29nEaDLdzvuHdB19CvSGJjPgkZJNk=
github.com/vmware/vmw-guestinfo v0.0.0-20220317130741-510905f0efa3 h1:v6jG/tdl4O07LNVp74Nt7/OyL+1JsIW1M2f/nSvQheY=
github.com/vmware/vmw-guestinfo v0.0.0-20220317130741-510905f0efa3/go.mod h1:CSBTxrhePCm0cmXNKDGeu+6bOQzpaEklfCqEpn89JWk=
github.com/vmware/vmw-ovflib v0.0.0-20170608004843-1f217b9dc714 h1:wJqF3m4Tj8I4beSi6vGxIyNtsq6wwGqhK3UnA99ltL4=
github.com/vmware/vmw-ovflib v0.0.0-20170608004843-1f217b9dc714/go.mod h1:jiPk45kn7klhByRvUq5i2vo1RtHKBHj+iWGFpxbXuuI=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
Loading

0 comments on commit dc84fed

Please sign in to comment.