coopnorge / provider-github

Apache License 2.0
23 stars 13 forks source link

Usage with GitHub-enterprise GitHub instance #23

Closed sebastienbrunkyndryl closed 6 months ago

sebastienbrunkyndryl commented 1 year ago

Hello,

In order to use the provider with a GitHub-enterprise instance it's required to set base_url property, but I don't retrieve the properties into to "providerconfigs.github.upbound.io" CRD.

Could you add an example to explain how to make it ?

AtzeDeVries commented 1 year ago

Hi @sebastienbrunkyndryl

Sorry for the late reply. I think you should configure the base url via the credentials. See https://github.com/coopnorge/provider-github#adding-provider-config

apiVersion: v1
kind: Secret
metadata:
  name: provider-secret
  namespace: upbound-system
type: Opaque
stringData:
  credentials: "{\"token\":\"${GH_TOKEN}\",\"owner\":\"${GH_OWNER}\"}"

So modify the credentials key in order to support GHE. The format of the json is the same as configuring the terraform provider: https://registry.terraform.io/providers/integrations/github/latest/docs#argument-reference

I cannot test this, but i hope that works.

gilfthde commented 7 months ago

I can confirm that adding the base_url property into the credentials JSON object works.

AtzeDeVries commented 6 months ago

@sebastienbrunkyndryl i am going to close it, but feel free to reopen if this issue is not resolved.