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

Complete documentation coverage of registry operator #46

Merged
merged 8 commits into from
Aug 30, 2023

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Aug 25, 2023

Please specify the area for this PR

What does does this PR do / why we need it:

Which issue(s) this PR fixes:

Fixes devfile/api#1015
Fixes partially devfile/api#1233

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?
  • Gosec scans

Documentation

How to test changes / Special notes to the reviewer:

@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.61% 🎉

Comparison is base (dea070a) 22.11% compared to head (8f28abc) 22.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #46      +/-   ##
==========================================
+ Coverage   22.11%   22.72%   +0.61%     
==========================================
  Files          23       23              
  Lines        1307     1307              
==========================================
+ Hits          289      297       +8     
+ Misses       1001      995       -6     
+ Partials       17       15       -2     
Files Changed Coverage Δ
api/v1alpha1/devfileregistry_types.go 100.00% <ø> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

registryName: test
storage:
enabled: true
ociRegistryImage: 2Gi
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be registryVolumeSize IMO, but the code currently indicate this:

	RegistryVolumeSize string `json:"ociRegistryImage,omitempty"`

Do we want to change the code directly, or do we want to deprecate it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preferably we should fix it before documenting it as it's a typo.

registryName: test
tls:
enabled: true
ociRegistryImage: my-tls-secret
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be secretName IMO, but the code currently indicates this:

	SecretName string `json:"ociRegistryImage,omitempty"`

Do we want to change the code directly, or do we want to deprecate it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preferably we should fix it before documenting it as it's a typo.

Signed-off-by: Philippe Martin <[email protected]>
Signed-off-by: Philippe Martin <[email protected]>
Signed-off-by: Philippe Martin <[email protected]>
Signed-off-by: Philippe Martin <[email protected]>
EOF
```

## Using a Persistent Volume to store OCI images
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As part of devfile/api#1093, we will be retiring the storage field for the devfile registry, as it's no longer used. So we should leave it out of the documentation

registryName: test
tls:
enabled: true
ociRegistryImage: my-tls-secret
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preferably we should fix it before documenting it as it's a typo.

registryName: test
storage:
enabled: true
ociRegistryImage: 2Gi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preferably we should fix it before documenting it as it's a typo.

Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I add one feedback comment on the first time setup.

Additionally, we'll need to run make install-cert before running make install && make deploy

CONTRIBUTING.md Outdated
Comment on lines 19 to 23
#### First Time Setup
1. Install prerequisites:
- Go 1.13 or higher
- Go 1.18 or higher
- Docker or Podman
- Operator-SDK 1.11.0 or higher (including `controller-gen` 0.6.0 or higher)
- Operator-SDK 1.28.0 or higher (including `controller-gen` 0.10.0 or higher)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could link to README Requirements instead or vice versa, as the content in these places are the same.

Signed-off-by: Philippe Martin <[email protected]>
@feloy
Copy link
Contributor Author

feloy commented Aug 30, 2023

Looks great! I add one feedback comment on the first time setup.

Additionally, we'll need to run make install-cert before running make install && make deploy

@michael-valdron Thanks for your review. I have pushed a new commit for first 2 points of devfile/api#1233

I don't understand what the third one means (I cannot find such a command in Makefile):

 Include docker-buildx as an optional build and push step for multi arch


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:
The `oc` executable must be accessible.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the current state this is required, however we will need to open an issue to allow kubectl to be used for the integration test suite given we support OpenShift and Kubernetes.

Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Looks great! I add one feedback comment on the first time setup.
Additionally, we'll need to run make install-cert before running make install && make deploy

@michael-valdron Thanks for your review. I have pushed a new commit for first 2 points of devfile/api#1233

I don't understand what the third one means (I cannot find such a command in Makefile):

 Include docker-buildx as an optional build and push step for multi arch

This is a new rule that will be added in #45, I can include this doc change there.

@openshift-ci openshift-ci bot added the lgtm label Aug 30, 2023
@openshift-ci
Copy link

openshift-ci bot commented Aug 30, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feloy, michael-valdron

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@michael-valdron
Copy link
Member

/retest

@michael-valdron michael-valdron merged commit 9ac9961 into devfile:main Aug 30, 2023
5 checks passed
thepetk pushed a commit to thepetk/devfile-registry-operator that referenced this pull request Aug 20, 2024
* Add more commands in README

Signed-off-by: Philippe Martin <[email protected]>

* Remove definition of NAMESPACE when executing make run, which seems not used

Signed-off-by: Philippe Martin <[email protected]>

* Update CONTRIBUTING

Signed-off-by: Philippe Martin <[email protected]>

* Document DevfileRegistry resource

Signed-off-by: Philippe Martin <[email protected]>

* Update REGISTRIES_LISTS

Signed-off-by: Philippe Martin <[email protected]>

* Fix typo "ociRegistryImage" instead of registryVolumeSize and secretName

Signed-off-by: Philippe Martin <[email protected]>

* No doc about Storage

Signed-off-by: Philippe Martin <[email protected]>

* Update CONTRIBUTING

Signed-off-by: Philippe Martin <[email protected]>

---------

Signed-off-by: Philippe Martin <[email protected]>
Signed-off-by: thepetk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Complete documentation coverage of registry operator
3 participants