forked from kptdev/kpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git: handle resolution of per-package versions (kptdev#2681) We can have a git tag that looks like `packageDir/version`, this allows for independent versioning of packages that share a git repo. We need to try both ref forms when resolving git packages. PackageDraft interface should not inherit from Package (kptdev#2678) In particular, some of the methods such as GetResources are ambiguous until we finish the draft (do we want the in-progress resources or the upstream resources?) Minor fixups to better surface errors (kptdev#2680) In general, we should always return the error, unless we actually want to mask it e.g. for security reasons (and in that case, we would normally expect to log the underlying error instead of wrapping). Clean up Makefile (kptdev#2685) * Remove init and deinit (no longer useful) * Fix module discovery * Clean up directory references Render and Eval via Simple Memory FS (kptdev#2684) * Render and Eval via Simple Memory FS For now the filesystem is inserted at lower level; In future changes the mutation Apply will accept the filesystem abstraction to avoid back-and-forth between filesystem and PackageResources. * Clean up Function Evaluation to use new interface * Remove unnecessary kpt module Working towards applying packages from a repository (kptdev#2686) First steps (with lots of hard-coding and hacks) towards applying from a repository to a cluster. Add priority and fairness to RBAC roles (kptdev#2692) aggregated-apiservers seem to query these resources, and spam the logs (at least) if they don't have permission. Applying: publish MVP status (kptdev#2695) We start to expose the status of the sync operation. Fix Docker Build (kptdev#2696) Remove kpt directory from Docker build. Tidy Go Modules (kptdev#2699) * Fix Go Modules * Run Tidy in Porch Workflow Add Roundtrip Tests (kptdev#2703)
- Loading branch information
1 parent
bb9f5f4
commit b20eaf6
Showing
46 changed files
with
2,199 additions
and
2,158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,5 @@ jobs: | |
- name: Test | ||
run: make test | ||
working-directory: ./porch | ||
- name: Tidy | ||
run: make tidy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package fuzzer | ||
|
||
import ( | ||
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" | ||
) | ||
|
||
var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} { | ||
return []interface{}{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package install | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/GoogleContainerTools/kpt/porch/api/porch/fuzzer" | ||
"k8s.io/apimachinery/pkg/api/apitesting/roundtrip" | ||
) | ||
|
||
func TestRoundTripTypes(t *testing.T) { | ||
roundtrip.RoundTripTestForAPIGroup(t, Install, fuzzer.Funcs) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2022 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -ex | ||
|
||
kubectl apply -f - <<EOF | ||
apiVersion: porch.kpt.dev/v1alpha1 | ||
kind: PackageRevision | ||
metadata: | ||
namespace: default | ||
name: "deployment:myfirstnginx:v1" | ||
spec: | ||
packageName: myfirstnginx | ||
revision: v1 | ||
repository: deployment | ||
tasks: | ||
- type: clone | ||
clone: | ||
upstreamRef: | ||
type: git | ||
git: | ||
repo: https://github.com/GoogleContainerTools/kpt | ||
ref: v0.7 | ||
directory: package-examples/nginx | ||
EOF | ||
|
||
kubectl get packagerevision -n default deployment:myfirstnginx:v1 -oyaml | ||
|
||
kubectl get packagerevisionresources -n default deployment:myfirstnginx:v1 -oyaml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright 2022 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: deployment | ||
namespace: default | ||
spec: | ||
title: Deployment | ||
description: Deployment Repository for testing Porch. | ||
content: PackageRevision # TODO: Deployment or similar? | ||
type: oci | ||
oci: | ||
# Replace with your OCI repository. | ||
registry: us-west1-docker.pkg.dev/example-google-project-id/deployment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# GCP project to use for development | ||
GCP_PROJECT_ID ?= $(shell gcloud config get-value project) | ||
|
||
.PHONY: run-local | ||
run-local: | ||
GCP_PROJECT_ID=${GCP_PROJECT_ID} HACK_ENABLE_LOOPBACK=1 go run . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 26 additions & 3 deletions
29
porch/controllers/remoterootsync/api/v1alpha1/zz_generated.deepcopy.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.