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

Add documentation on how to enable and interact with the in-cluster gitea server #232

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jordigilh
Copy link

Extend the operator documentation to detail how to enable and interact with the in-cluster Gitea server.

@abhatt-rh PTAL

@jordigilh jordigilh force-pushed the add_gitea_incluster branch from 1ea2ca4 to b824a20 Compare February 1, 2023 19:41
@jordigilh jordigilh force-pushed the add_gitea_incluster branch from b824a20 to 1200064 Compare February 1, 2023 19:43
@abhatt-rh
Copy link
Collaborator

Hi @jordigilh, thank you for this PR. I looked at the PR preview and observed that the code blocks are a bit off (text is running out of the the block). I'll take a look at it later today.

@abhatt-rh
Copy link
Collaborator

Hi @jordigilh, thank you for this PR. I looked at the PR preview and observed that the code blocks are a bit off (text is running out of the the block). I'll take a look at it later today.

Hi @jordigilh , I cloned your PR and built the preview locally and seems to be building fine i.e without the text in codeblocks running out of the block. I think the issue might be with the PR preview, which can sometimes mess rendering.

Copy link
Collaborator

@abhatt-rh abhatt-rh left a comment

Choose a reason for hiding this comment

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

Hi @jordigilh,
I added a few comments based on Red Hat style and consistency guidelines.
For now, this seems good to merge, but expect more changes to the content when we convert to Asciidoc and review it more closely.

Let me know if you have questions.

Thanks,
Avani


[![Enabling in-cluster fork](/images/operator/enable-in-cluster-fork.png)](/images/operator/enable-in-cluster-fork.png))

To enable the in cluster fork, extend the `gitSpec` section in the pattern and tick the `useInClusterFork` checkbox. During the reconciliation loop, the operator will deploy a Gitea server, if none exists already, and fork the repository defined in the `target Repo` and `target Revision` onto the Gitea instance. Then it will use the newly forked repository as the source URL in the argoCD application. The URL of the newly created repository will be captured in the `Pattern` Status section, under the `inClusterRepo` field.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just FYI, we are in the process of converting all our content from Markdown to Asciidoc. When I convert the content for the Validated Patterns Opeartor, this section will become a procedure with steps to complete the procedure and with a step to verify if it was successful.

Suggested change
To enable the in cluster fork, extend the `gitSpec` section in the pattern and tick the `useInClusterFork` checkbox. During the reconciliation loop, the operator will deploy a Gitea server, if none exists already, and fork the repository defined in the `target Repo` and `target Revision` onto the Gitea instance. Then it will use the newly forked repository as the source URL in the argoCD application. The URL of the newly created repository will be captured in the `Pattern` Status section, under the `inClusterRepo` field.
To enable the in-cluster fork, extend the `gitSpec` section in the pattern and select the `useInClusterFork` checkbox. During the reconciliation loop, the operator deploys a Gitea server, if none exists already, and fork the repository that is defined in the `target Repo` and `target Revision` onto the Gitea instance. Then it will use the newly forked repository as the source URL in the Argo CD application. The URL of the newly created repository will be captured in the `Pattern` Status section, under the `inClusterRepo` field.


## Using the in-cluster Gitea server

The operator supports the ability to host a forked version of the pattern inside the cluster. This means you don't need to fork the pattern repository before deploying it in your cluster to be able to tweak while you work on it. This can be useful if you don't want to host the forked repository outside the cluster, or for a quick demo.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The operator supports the ability to host a forked version of the pattern inside the cluster. This means you don't need to fork the pattern repository before deploying it in your cluster to be able to tweak while you work on it. This can be useful if you don't want to host the forked repository outside the cluster, or for a quick demo.
The operator supports the ability to host a forked version of the pattern inside the cluster. This means you do not need to fork the pattern repository before deploying it in your cluster to be able to tweak while you work on it. This can be useful if you do not want to host the forked repository outside the cluster, or for a quick demo.

...
```

At this point we're ready to clone the repository locally:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
At this point we're ready to clone the repository locally:
At this point, we are ready to clone the repository locally:

Resolving deltas: 100% (3658/3658), done.
```

Before pushing changes to the repository, we'll need to extract the user credentials that are found in the `gitea` namespace, under the `gitea-user-credentials` secret:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Before pushing changes to the repository, we'll need to extract the user credentials that are found in the `gitea` namespace, under the `gitea-user-credentials` secret:
Before pushing changes to the repository, we must extract the user credentials that are found in the `gitea` namespace, under the `gitea-user-credentials` secret:

0a4e3bf..ff79b6b main -> main
```

The gitops server will detect the newly applied changes and reconcile the pattern accordingly.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The gitops server will detect the newly applied changes and reconcile the pattern accordingly.
The GitOps server will detect the newly applied changes and reconcile the pattern accordingly.

@ipbabble
Copy link
Contributor

@abhatt-rh you going to merge this?

@abhatt-rh
Copy link
Collaborator

@abhatt-rh you going to merge this?

Hi @ipbabble Thank you for checking on this one. Once the review comments are implemented, we can get this merged. @jordigilh Can you PTAL?

@mbaldessari
Copy link
Contributor

We cannot merge this before validatedpatterns/patterns-operator#50 lands

@abhatt-rh
Copy link
Collaborator

abhatt-rh commented Mar 20, 2023

We cannot merge this before hybrid-cloud-patterns/patterns-operator#50 lands

Thank you for the context, @mbaldessari . In that case, I'll add the do-not-merge label so that no one merges it accidently.

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