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/forgejo #609

Merged
merged 5 commits into from
Feb 6, 2025
Merged

Add/forgejo #609

merged 5 commits into from
Feb 6, 2025

Conversation

wejdross
Copy link
Member

@wejdross wejdross commented Jan 27, 2025

Adding base Forgejo and Codey services, claim examples for easy testing:

apiVersion: vshn.appcat.vshn.io/v1
kind: VSHNForgejo
metadata:
  name: myforgejo
  namespace: kalafior-testing
spec:
  parameters:
    service:
      adminEmail: "[email protected]"
      fqdn:
      #  - "forgejo23.apps.lab-cloudscale-rma-0.appuio.cloud"
        - "myforgejo2.127.0.0.1.nip.io"
    security:
      deletionProtection: false
  writeConnectionSecretToRef:
    name: mysupersecret
---
apiVersion: codey.io/v1
kind: CodeyInstance
metadata:
  name: mycodey
  namespace: vshn-test
spec:
  parameters:
    service:
      adminEmail: "[email protected]"
    size:
      plan: small
  writeConnectionSecretToRef:
    name: mycodey-secret

@wejdross wejdross added minor enhancement New feature or request labels Jan 27, 2025
@wejdross wejdross removed the minor label Jan 27, 2025
@wejdross wejdross self-assigned this Jan 27, 2025
@wejdross wejdross marked this pull request as ready for review January 27, 2025 17:57
@wejdross wejdross force-pushed the add/forgejo branch 2 times, most recently from ad6c0fa to 1806357 Compare January 28, 2025 11:06
Copy link
Member

@tobru tobru left a comment

Choose a reason for hiding this comment

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

I've seen multiple places where Codey is named "VSHNCodey" or "Codey by VSHN". This is wrong, the service is called just "Codey", no VSHN in it. Also see https://kb.vshn.ch/app-catalog/service/forgejo-codey/architecture.html#_codey for how the claim should look like, especially apiVersion and kind.

class/defaults.yml Outdated Show resolved Hide resolved
class/defaults.yml Outdated Show resolved Hide resolved
class/defaults.yml Outdated Show resolved Hide resolved
class/defaults.yml Outdated Show resolved Hide resolved
@wejdross wejdross requested review from tobru, a team, Kidswiss, TheBigLee and zugao and removed request for a team January 30, 2025 14:03
@wejdross wejdross force-pushed the add/forgejo branch 3 times, most recently from f7f3776 to 59e1516 Compare February 5, 2025 14:58
@wejdross
Copy link
Member Author

wejdross commented Feb 5, 2025

@tobru @TheBigLee @zugao I need review here before merging

@@ -58,7 +61,7 @@ parameters:
appcat:
registry: ghcr.io
repository: vshn/appcat
tag: v4.122.0
tag: add/forgejo
Copy link
Member

Choose a reason for hiding this comment

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

Don't forget to change that to the correct version

@@ -20,6 +20,7 @@ local getFunction(name, package, runtimeConfigName) = {
},
spec: {
package: package,
packagePullPolicy: 'IfNotPresent',
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be configurable. Especially for local testing, where we want to set it to "Always"

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, I have the same feeling, but I'm not sure if this is the correct place to make such change, maybe a followup?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would keep this as is for now. The appcat function works the same if I am not wrong.

service:
adminEmail: "[email protected]"
fqdn:
- "somesuperingressname.apps.lab-cloudscale-rma-0.appuio.cloud"
Copy link
Member

Choose a reason for hiding this comment

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

I would choose a more useful fqdn eg: forgejo-e2e.apps.lab-cloudscale-rma-0.appuio.cloud

Copy link
Member Author

Choose a reason for hiding this comment

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

renamed

fqdn=$(kubectl -n "$ns" get ingress -oyaml | yq -r '.items.[0].spec.tls.[0].hosts[0]')

echo "$fqdn = somesuperingressname.apps.lab-cloudscale-rma-0.appuio.cloud"
[[ "$fqdn" == "somesuperingressname.apps.lab-cloudscale-rma-0.appuio.cloud" ]]
Copy link
Member

Choose a reason for hiding this comment

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

same here, see above

Copy link
Member Author

Choose a reason for hiding this comment

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

renamed

Copy link
Contributor

@zugao zugao left a comment

Choose a reason for hiding this comment

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

We need to discuss some things

forgejo:
registry: ghcr.io
image: vshn/forgejo
tag: latest
Copy link
Contributor

Choose a reason for hiding this comment

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

this will probably restart instances once new version is available, we should pin to the latest symver.

Copy link
Member Author

Choose a reason for hiding this comment

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

that's copy-paste leftover, I just cleaned it up

defaultPlan: small
sla: 99.25
plans:
mini:
Copy link
Contributor

Choose a reason for hiding this comment

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

have these plans been agreed already? @tobru

Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -951,7 +1023,47 @@ parameters:
cpu: "2"
memory: "8Gi"
disk: 16Gi

codey:
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like the tfact that we are considering Codey as a service like any other service we already offer. Codey is a specific implementation of Forgejo so we need to discuss whether we want to differentiate it in the component from the normal services. For instance we should consider to put it under forgeo or maybe under abstracService instead of service. Also if we agreed that Codey has nothing to do with VSHN that it might not make sense to leave it under vshn at all (appcat.services.vshn). THis has to be discussed asap before it's too late.

Copy link
Member Author

Choose a reason for hiding this comment

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

this is a good point and I fully agree, but we have our workflow in component and it expects services to be structured in a specific way, if we want to do any change, it's another story, another ticket and it requires a team-wide decision.

Copy link
Contributor

Choose a reason for hiding this comment

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

Lets keep it this way for now

@wejdross wejdross requested review from TheBigLee and zugao February 6, 2025 08:34
Copy link
Contributor

@zugao zugao left a comment

Choose a reason for hiding this comment

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

LGTM

@wejdross wejdross merged commit e7ea7ed into master Feb 6, 2025
10 checks passed
@wejdross wejdross deleted the add/forgejo branch February 6, 2025 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants