-
Notifications
You must be signed in to change notification settings - Fork 23
Implement a Devfile Registry operator #2
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e83ffc4
Implement the DevfileRegistry custom resource
johnmcollier 82641d0
Implement the Devfile Registry operator core logic
johnmcollier cff9ae4
Create integration test framework for the operator
johnmcollier 9898f86
Quick cleanup before opening PR
johnmcollier 2e60e0e
Don't expose the OCI registry anymore
johnmcollier 4823032
Update integration test yamls to use new image
johnmcollier 8ffb158
Address review comments
johnmcollier 4dee5bd
Support ingress on OpenShift if ingress domain set
johnmcollier c53bde4
Address review comments
johnmcollier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,31 @@ | ||
# | ||
# Copyright (c) 2020 Red Hat, Inc. | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
name: Next Dockerimage | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout registry-operator source code | ||
uses: actions/checkout@v2 | ||
- name: Docker Build & Push | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
registry: quay.io | ||
repository: devfile/registry-operator | ||
dockerfile: Dockerfile | ||
tags: next | ||
tag_with_sha: true |
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -1,2 +1,58 @@ | ||
# registry-operator | ||
Operator for devfile registry | ||
# Devfile Registry Operator | ||
|
||
Devfile Registry operator repository that contains the operator for the DevfileRegistry Custom Resource. | ||
|
||
## Issue Tracking | ||
|
||
Issue tracking repo: https://github.com/devfile/api with label area/registry | ||
|
||
## Running the controller in a cluster | ||
|
||
The controller can be deployed to a cluster provided you are logged in with cluster-admin credentials: | ||
|
||
```bash | ||
export IMG=quay.io/devfile/registry-operator:next | ||
make install && make deploy | ||
``` | ||
|
||
## Development | ||
|
||
The repository contains a Makefile; building and deploying can be configured via the environment variables | ||
|
||
|variable|purpose|default value| | ||
|---|---|---| | ||
| `IMG` | Image used for controller | `quay.io/devfile/registry-operator:next` | | ||
|
||
Some of the rules supported by the makefile: | ||
|
||
|rule|purpose| | ||
|---|---| | ||
| docker-build | build registry operator docker image | | ||
| docker-push | push registry operator docker image | | ||
| deploy | deploy operator to cluster | | ||
| install | create the devfile registry CRDs on the cluster | | ||
| uninstall | remove the devfile registry operator and CRDs from the cluster | | ||
| manifests | Generate manifests e.g. CRD, RBAC etc. | | ||
| generate | Generate the API type definitions. Must be run after modifying the DevfileRegistry type. | | ||
| test_integration | Run the integration tests for the operator. | | ||
|
||
To see all rules supported by the makefile, run `make help` | ||
|
||
## Testing | ||
|
||
To run integration tests for the operator, run `make test_integration`. | ||
|
||
By default, the tests will use the default image for the operator, `quay.io/devfile/registry-operator:next`. To use your own image, run: | ||
|
||
``` | ||
export IMG=<your-operator-image> | ||
make test_integration | ||
``` | ||
|
||
### Run operator locally | ||
It's possible to run an instance of the operator locally while communicating with a cluster. | ||
|
||
```bash | ||
export NAMESPACE=devfileregistry-operator | ||
make run ENABLE_WEBHOOKS=false | ||
``` |
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -1,2 +1,8 @@ | ||
resources: | ||
- manager.yaml | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
images: | ||
- name: controller | ||
newName: quay.io/devfile/registry-operator | ||
newTag: next |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.