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

Revert OCI and Location #2813

Closed
wants to merge 86 commits into from
Closed

Revert OCI and Location #2813

wants to merge 86 commits into from

Conversation

martinmaly
Copy link
Contributor

In preparation for merge of porch branch back into main:

martinmaly and others added 30 commits January 24, 2022 16:59
Rebased on main and squashed

Co-authored-by: Louis DeJardin <[email protected]>
* Fix Makefile Formatting

* Remove dependency on kptlib
* Tidy modules
* Delete kptlib
* Remove kptlib replace Clause
* Fix Porch Build

Location of ClonerUsingGitExec changed in the OCI branch.

* Add Porch Workflow
* Update VSCode Workspace
* Add launch.json
* Move Clone Logic Into Own File
* Implement Git pacakge fetch
Initial version of the function interfaces.
* Tidy Porch Modules
* Ignore Modules In .build Directory
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.
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?)
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).
* Remove init and deinit (no longer useful)
* Fix module discovery
* Clean up directory references
* 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
First steps (with lots of hard-coding and hacks) towards applying from
a repository to a cluster.
aggregated-apiservers seem to query these resources, and spam the logs
(at least) if they don't have permission.
We start to expose the status of the sync operation.
Remove kpt directory from Docker build.
* Fix Go Modules

* Run Tidy in Porch Workflow
* Expose Renderer api with FileSystem abstraction

* Merge Fs methods in pkg.go

* Update name

* Merge ReadKptfile and address changes

* Update porch go.sum

* Update results write

* Suggested changes
* Create fix-all and verify-fix-all

We run all the formatters / header makers etc.

In CI, we run them and make sure that the git checkout is still clean.

Ideally we would also run generate, but it is very slow, and it also
requires GOPATH to be set.  We can do that in CI later.

* Add missing headers
* Add install-protoc.sh script
* Define a FunctionEvaluator interface
* Create an empty server implementation
* Integrate porch with renderer interview

* Suggested changes

* Add implementation
Replacing our very primitive apply logic with something better using
server-side apply.
We create a simple git server, and we try round-tripping a package.

Some hacks/todos uncovered that we need to tackle.
Our package logic requires a Kptfile, so adding one (for now).
And make names more consistent.
Several functions are built into the server Docker image and are exec'd
with input.
Added simple client which can be used (in ./func directory):

```
go run ./client \
  --address=192.168.8.202:9445 \
  --package=./config/ \
  --image=gcr.io/kpt-fn/set-namespace:v0.2.0 \
  -- \
  namespace=foo
```
martinmaly and others added 19 commits February 10, 2022 18:38
Git branch and directory can be optional (defaulting to `main` and `/` respectively,
while `SecretRef.Name` is required since nameless secret reference is unhelpful.
* Create `deployment-config` and `push-and-deploy` make targets
* Use kpt function to set images on the deployment config
* Set workload identity service accounts via set-annotations
* Simplify instructions
* Build at Git tag
* Combine Deployment Config in Same Directory
* Rename config files, assign 0 to CRDs.
* `kubectl apply` recursively just in case we add more config later
Use consistent version of controller-gen (v0.8.0)
crd:preserveUnknownFields marker has been removed (`false` was the
required value for v1 CRDs).
Otherwise we crash when trying to render a package.
We weren't checking errors when building a CaDEngine.
When creating an empty package, we get an error otherwise (as kpt
render doesn't work if it doesn't have a package).
Enable e2e tests to use git server
Simple test that creates a package by cloning from upstream repository.
Some blueprints we encounter in tests use the older version of the function.
Newly created Git package returned package resources at its old commit
SHA where no package contents existed, thus returning empty resources.
As package changes, advance the reference to return up-to-date package
revision contents.
* Make Git Server hostable in cluster
* Add makefile targets to build and push its images
* Add PackageRevision .../approval subresource
* Generate client
* Add Clone Package Test
* Fix issues with git server's reporting of symbolic references
Preparing for merge of porch branch back into main,
Preparing for merge of porch branch back into main.
@martinmaly martinmaly requested a review from loudej February 18, 2022 18:28
@martinmaly martinmaly closed this Feb 18, 2022
@martinmaly martinmaly deleted the revert branch February 18, 2022 18:30
@martinmaly martinmaly restored the revert branch February 18, 2022 18:31
@martinmaly martinmaly deleted the revert branch February 22, 2022 17:21
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