Skip to content

Commit

Permalink
Merge branch 'GoogleCloudPlatform:master' into add-poco-test
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyue-101 authored Oct 28, 2024
2 parents a2c4600 + 6e95793 commit 4d9b510
Show file tree
Hide file tree
Showing 1,570 changed files with 194,177 additions and 29,328 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mockgcp/generated/** linguist-generated=true
pkg/clients/generated/** linguist-generated=true
**/*.generated.go linguist-generated=true

**/go.sum linguist-generated=true
1 change: 1 addition & 0 deletions .github/license-lint-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ unrestricted_licenses:
- BSD-3-Clause
- BSD-2-Clause
- 0BSD
- CC-BY-3.0

reciprocal_licenses:
- MPL-2.0
Expand Down
44 changes: 0 additions & 44 deletions .github/workflows/dcl-upgrade-probe.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
lint:
name: lint
runs-on: ubuntu-22.04
timeout-minutes: 7
timeout-minutes: 12
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
Expand All @@ -47,3 +47,4 @@ jobs:
uses: golangci/[email protected]
with:
version: v1.59.1 # should match the version in Makefile
args: --timeout=10m
4 changes: 2 additions & 2 deletions .github/workflows/presubmit-compositions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
lint:
name: lint
runs-on: ubuntu-22.04
timeout-minutes: 7
timeout-minutes: 12
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
Expand All @@ -46,7 +46,7 @@ jobs:
with:
working-directory: ./experiments/compositions/composition
version: v1.59.1 # should match the version in Makefile
args: --timeout=5m
args: --timeout=10m
verify-goimports:
runs-on: ubuntu-latest
steps:
Expand Down
49 changes: 39 additions & 10 deletions .github/workflows/presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
uses: actions/upload-artifact@v4
if: '!cancelled()'
with:
name: unitest_result
name: unittest_result
path: unittest_result.json
retention-days: 5
tests-e2e-samples:
Expand All @@ -79,9 +79,9 @@ jobs:
env:
ARTIFACTS: /tmp/artifacts
- name: "Upload artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifacts
name: artifacts-tests-e2e-samples
path: /tmp/artifacts/
tests-e2e-fixtures:
runs-on: ubuntu-latest
Expand All @@ -97,9 +97,9 @@ jobs:
env:
ARTIFACTS: /tmp/artifacts
- name: "Upload artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifacts
name: artifacts-tests-e2e-fixtures
path: /tmp/artifacts/
tests-e2e-fixtures-compute:
runs-on: ubuntu-latest
Expand All @@ -115,9 +115,9 @@ jobs:
env:
ARTIFACTS: /tmp/artifacts
- name: "Upload artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifacts
name: artifacts-tests-e2e-fixtures-compute
path: /tmp/artifacts/
tests-e2e-fixtures-gkehub:
runs-on: ubuntu-latest
Expand All @@ -133,13 +133,31 @@ jobs:
env:
ARTIFACTS: /tmp/artifacts
- name: "Upload artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifacts-tests-e2e-fixtures-gkehub
path: /tmp/artifacts/
tests-e2e-fixtures-sql:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: "Run mock fixtures tests for sql service"
run: |
./scripts/github-actions/tests-e2e-fixtures-sql
env:
ARTIFACTS: /tmp/artifacts
- name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
name: artifacts
name: artifacts-tests-e2e-fixtures-sql
path: /tmp/artifacts/
pause-tests:
runs-on: ubuntu-22.04
timeout-minutes: 60
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand Down Expand Up @@ -194,6 +212,17 @@ jobs:
dev/tasks/build-images
env:
PROJECT_ID: cnrm-test
test-mappers-roundtrip:
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: "dev/ci/presubmits/test-mappers-roundtrip"
run: |
dev/ci/presubmits/test-mappers-roundtrip
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

run:
timeout: 5m
timeout: 10m
issues:
exclude-dirs:
- third_party
Expand Down
37 changes: 30 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ You need to set up your own DEV environment before contributing to this project.

We follow the typical contribution flow similar to most OSS projects on GitHub.

### Configure Variables

Export the `GITHUB_USERNAME` environment variable which will be used in subsequent
steps.

```
export GITHUB_USERNAME=YOUR_USERNAME
```

### Fork and pull

We follow the
Expand Down Expand Up @@ -64,13 +73,13 @@ summary, you perform the follow steps to get your fork ready:
https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository

We recommend you to create the local clone under the path
`~/go/src/github.com/YOUR_USERNAME`. This will help to avoid a few known
`~/go/src/github.com/$GITHUB_USERNAME`. This will help to avoid a few known
build frictions related to generated code.

```shell
mkdir -p ~/go/src/github.com/YOUR_USERNAME
cd ~/go/src/github.com/YOUR_USERNAME
git clone https://github.com/YOUR_USERNAME/k8s-config-connector # If you use ssh key auth, this will be [email protected]:YOUR_USERNAME/k8s-config-connector.git
mkdir -p ~/go/src/github.com/$GITHUB_USERNAME
cd ~/go/src/github.com/$GITHUB_USERNAME
git clone https://github.com/$GITHUB_USERNAME/k8s-config-connector # If you use ssh key auth, this will be [email protected]:$GITHUB_USERNAME/k8s-config-connector.git
```

### Set up your environment
Expand All @@ -96,7 +105,7 @@ repo to quickly set up a local dev environment.
1. Change to environment-setup directory.

```shell
cd ~/go/src/github.com/YOUR_USERNAME/k8s-config-connector/scripts/environment-setup
cd ~/go/src/github.com/$GITHUB_USERNAME/k8s-config-connector/scripts/environment-setup
```

1. Set up sudoless Docker.
Expand All @@ -115,7 +124,7 @@ repo to quickly set up a local dev environment.
1. Install Golang.

```shell
cd ~/go/src/github.com/YOUR_USERNAME/k8s-config-connector/scripts/environment-setup
cd ~/go/src/github.com/$GITHUB_USERNAME/k8s-config-connector/scripts/environment-setup
./golang-setup.sh
source ~/.profile
```
Expand Down Expand Up @@ -153,7 +162,7 @@ repo to quickly set up a local dev environment.
validate creation of this resource in the next step. So we can do:
```shell
cd ~/go/src/github.com/YOUR_USERNAME/k8s-config-connector
cd ~/go/src/github.com/$GITHUB_USERNAME/k8s-config-connector
make manifests
kubectl apply -f config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_artifactregistryrepositories.artifactregistry.cnrm.cloud.google.com.yaml
```
Expand All @@ -172,6 +181,20 @@ repo to quickly set up a local dev environment.
make deploy-controller
```
1. If you want to install config connector on a brand new GKE cluster, the following command will install all CRDs, locally build, push and deploy all workloads to a standard GKE cluster.
```shell
make deploy-kcc-standard
make install
```
For autopilot clusters, please use the following command.
```shell
make deploy-kcc-autopilot
make install
```
### Validate your environment
The script `gcp-setup.sh` annotates your `default` namespace in the GKE cluster
Expand Down
Loading

0 comments on commit 4d9b510

Please sign in to comment.