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

🌱 Use Go 1.19, set GOMEMLIMIT in kcp manifest #2468

Merged
merged 3 commits into from
Dec 12, 2022
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
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
namespace: ci
name: kcp-dev-build-root
tag: "1.18"
tag: "1.19"
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: v1.18
go-version: v1.19
cache: true
- run: make build

Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: v1.18
go-version: v1.19
cache: true
- run: make build

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-gen-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
path: docs
- uses: actions/setup-go@v3
with:
go-version: v1.18
go-version: v1.19
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/e2e-ci-ppc64le.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,34 @@ jobs:
with:
arch: ppc64le
distro: ubuntu20.04

dockerRunArgs: |
--volume "/var/run/docker.sock:/var/run/docker.sock"

run: |
apt-get update -y
apt-get install wget tar gcc git curl runc iptables libdevmapper1.02.1 make jq -y

#Install docker
apt-get install apt-transport-https ca-certificates software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=ppc64el] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update -y
apt-get install docker-ce -y
service docker start

#Install Go, Kind, kubectl
cd /root/ && wget https://go.dev/dl/go1.18.linux-ppc64le.tar.gz
tar -C /usr/local -xzf go1.18.linux-ppc64le.tar.gz
cd /root/ && wget https://go.dev/dl/go1.19.linux-ppc64le.tar.gz
tar -C /usr/local -xzf go1.19.linux-ppc64le.tar.gz
export PATH=$PATH:/usr/local/go/bin
go install github.com/google/ko@latest
go install sigs.k8s.io/kind@v0.14.0
export PATH=$PATH:$(go env GOPATH)/bin
export PATH=$PATH:$(go env GOPATH)/bin
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/ppc64le/kubectl"
chmod +x kubectl
export PATH=$PATH:/root/

git clone https://github.com/kcp-dev/kcp.git && cd kcp
export PATH=$PWD/bin:$PATH
LOG_DIR=/tmp/e2e/shared-server/artifacts ARTIFACT_DIR=/tmp/e2e \
OS=linux ARCH=ppc64le E2E_PARALLELISM=4 make test-e2e -e TEST_ARGS="-timeout 50m"
OS=linux ARCH=ppc64le E2E_PARALLELISM=4 make test-e2e -e TEST_ARGS="-timeout 50m"
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: v1.18
go-version: v1.19
- name: Delete non-semver tags
run: 'git tag -d $(git tag -l | grep -v "^v")'
- name: Set LDFLAGS
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kcp-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: v1.18
go-version: v1.19

- name: Get the short sha
id: vars
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kcp-test-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: v1.18
go-version: v1.19

# Build and push the kcp test image, tagged with the commit SHA and the branch name.
- uses: imjasonh/setup-ko@v0.6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/syncer-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: v1.18
go-version: v1.19

# Build and push multi-arch supported syncer image, tagged with the commit SHA and the branch name.
- uses: imjasonh/setup-ko@v0.6
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ contribution. See the [DCO](DCO) file for details.
### Prerequisites

1. Clone this repository.
2. [Install Go](https://golang.org/doc/install) (1.18+).
2. [Install Go](https://golang.org/doc/install) (1.19+).
3. Install [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl).

### Build & verify
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

# Build the binary
FROM golang:1.18 AS builder
FROM golang:1.19 AS builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
46 changes: 23 additions & 23 deletions cmd/sharded-test-server/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@ limitations under the License.
// sharded-test-server starts the kcp-front-proxy and one or more (in the future) kcp shard.
// It also sets up the required certificates and keys for the front-proxy to connect to the shards:
//
// ┌────────────────┐ ┌────────────────┐ ┌────────────────┐
// │ │ │ │ │ │ All accept .kcp/client-ca.crt client certs.
// │ Root shard │ │ Shard 1 │ │ Shard 2 │ All accept .kcp/requestheader.crt requests with user/group headers.
// │ │ │ │ │ │ All use .kcp/serving-ca.crt compatible serving certs.
// │ .kcp-0/kcp.log │ │ .kcp-1/kcp.log │ │ .kcp-2/kcp.log │
// │ │ │ │ │ │
// └────────────────┘ └────────────────┘ └────────────────┘
// ▲ ▲ ▲ ▲
// Watches │ │ Redirects traffic │ ┌────────────┘
// shards │ │ to correct shard │ │
// │ └─────────┐ │ │
// │ │.kcp-front-proxy/requestheader.crt/key
// │ ┌──┴──────────────┐
// └────────┤ │
// .kcp/root.kubeconfig │ │
// │ kcp-front-proxy │
// │ │
// │ │
// └─────────────────┘
//
// .kcp/admin.kubeconfig │
//
// e2e test or kubectl
// ┌────────────────┐ ┌────────────────┐ ┌────────────────┐
// │ │ │ │ │ │ All accept .kcp/client-ca.crt client certs.
// │ Root shard │ │ Shard 1 │ │ Shard 2 │ All accept .kcp/requestheader.crt requests with user/group headers.
// │ │ │ │ │ │ All use .kcp/serving-ca.crt compatible serving certs.
// │ .kcp-0/kcp.log │ │ .kcp-1/kcp.log │ │ .kcp-2/kcp.log │
// │ │ │ │ │ │
// └────────────────┘ └────────────────┘ └────────────────┘
// ▲ ▲ ▲ ▲
// Watches │ │ Redirects traffic │ ┌────────────┘
// shards │ │ to correct shard │ │
// │ └─────────┐ │ │
// │ │.kcp-front-proxy/requestheader.crt/key
// │ ┌──┴──────────────┐
// └────────┤ │
// .kcp/root.kubeconfig │ │
// │ kcp-front-proxy │
// │ │
// │ │
// └─────────────────┘
//
// .kcp/admin.kubeconfig │
//
// e2e test or kubectl
//
// Invocation: cmd/sharded-test-server --v=3 --proxy-v=4 --shard-v=5
//
Expand Down
8 changes: 4 additions & 4 deletions docs/content/en/main/concepts/syncer.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ To build, make the root kcp folder your current working directory and run:
make build-all install build-kind-images
```

If your go version is not 1.18, which is the expected version, you need to run
If your go version is not 1.19, which is the expected version, you need to run

```bash
IGNORE_GO_VERSION=1 make build-all install build-kind-images
Expand Down Expand Up @@ -215,7 +215,7 @@ You can run the syncer in a kind cluster for development.
```sh
kubectl kcp workload sync kind --syncer-image <image name> -o syncer.yaml
```

1. Create a second workspace for your workloads and immediately enter it:

```sh
Expand All @@ -225,7 +225,7 @@ You can run the syncer in a kind cluster for development.
Workspace "my-workloads" (type root:organization) is ready to use.
Current workspace is "root:my-workloads" (type "root:organization").
```

1. Bind it to the `my-locations` workspace with the synctarget:

```bash
Expand Down Expand Up @@ -258,7 +258,7 @@ You can run the syncer in a kind cluster for development.
```bash
kubectl wait --for=condition=Ready synctarget/<mycluster>
```

1. Add a deployment to the my-workloads workspace and check the p-cluster to see if the workload has been created there:

```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/kcp-dev/kcp/docs

go 1.18
go 1.19

require github.com/google/docsy v0.4.0 // indirect
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kcp-dev/kcp

go 1.18
go 1.19

require (
github.com/MakeNowJust/heredoc v1.0.0
Expand Down
4 changes: 4 additions & 0 deletions manifest/kcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ spec:
env:
- name: EXTERNAL_HOSTNAME
value: kcp
- name: GOMEMLIMIT
valueFrom:
resourceFieldRef:
resource: requests.memory
livenessProbe:
failureThreshold: 3
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kcp-dev/kcp/pkg/apis

go 1.18
go 1.19

require (
github.com/google/go-cmp v0.5.5
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/third_party/conditions/util/conditions/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ type localizedCondition struct {
// - P2 - Status=False, Severity=Info
// - P3 - Status=True
// - P4 - Status=Unknown
//
// 3. The group with highest priority is used to determine status, severity and other info of the target condition.
//
// Please note that the last operation includes also the task of computing the Reason and the Message for the target
Expand Down
14 changes: 7 additions & 7 deletions pkg/client/clientset/versioned/fake/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions pkg/client/clientset/versioned/scheme/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ import (
// - the localObject was deleted
// 3. modification of the object to match the original/local object
// happens when either of the following is true:
// - the localObject's metadata doesn't match the cacheObject
// - the localObject's spec doesn't match the cacheObject
// - the localObject's status doesn't match the cacheObject
// - the localObject's metadata doesn't match the cacheObject
// - the localObject's spec doesn't match the cacheObject
// - the localObject's status doesn't match the cacheObject
func (c *controller) reconcileUnstructuredObjects(ctx context.Context, cluster logicalcluster.Name, gvr *schema.GroupVersionResource, cacheObject *unstructured.Unstructured, localObject *unstructured.Unstructured) error {
if localObject == nil {
return c.handleObjectDeletion(ctx, cluster, gvr, cacheObject)
Expand Down
2 changes: 1 addition & 1 deletion pkg/virtual/framework/dynamic/apiserver/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import (
dynamiccontext "github.com/kcp-dev/kcp/pkg/virtual/framework/dynamic/context"
)

// resourceHandler serves the `/apis` and `/api`` endpoints.
// resourceHandler serves the `/apis` and `/api` endpoints.
type resourceHandler struct {
apiSetRetriever apidefinition.APIDefinitionSetGetter
versionDiscoveryHandler *versionDiscoveryHandler
Expand Down
4 changes: 2 additions & 2 deletions pkg/virtual/framework/dynamic/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
// required to build virtual workspaces which can dynamically serve resources,
// based on API definitions (including an OpenAPI v3 schema), and a Rest storage provider.
//
// Main idea
// # Main idea
//
// APIs served by the virtual workspace are partitioned in API domains. Each API domain
// is defined by an api domain key and will expose a set of APIs
Expand All @@ -27,7 +27,7 @@ limitations under the License.
//
// APIs are served by an apiserver.DynamicAPIServer which is setup in the virtual workspace Register() method.
//
// Typical operation
// # Typical operation
//
// The RootPathResolver() method would usually interpret the URL sub-path, extract the API domain key from it,
// and pass the request to the apiserver.DynamicAPIServer, along with the API domain key, if the API domain key contains APIs.
Expand Down
1 change: 0 additions & 1 deletion pkg/virtual/syncer/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ limitations under the License.
//
// The builder package is the place where all these components are combined together, especially in the
// BuildVirtualWorkspace() function.
//
package syncer
1 change: 1 addition & 0 deletions pkg/virtual/syncer/transformations/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
// In addition to the upstream resource to transform, the transformation parameters
// also involve:
// - the overriding values of Syncer View summarized fields (the fields that the
//
// Syncer previously overrode, typically when updating the status, but this could
// also contain specific Spec fields)
// - the requested syncing intents for all SyncTargets.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading