Skip to content

Commit

Permalink
Add region for Hetzner for inlets-operator app
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Jun 12, 2024
1 parent 5d9f17f commit 2d35a89
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions cmd/apps/inletsoperator_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ IngressController`,
}

inletsOperator.Flags().StringP("namespace", "n", "default", "The namespace used for installation")
inletsOperator.Flags().StringP("license", "l", "", "The license key for inlets PRO")
inletsOperator.Flags().StringP("license-file", "f", "$HOME/.inlets/LICENSE", "Path to license JWT file for inlets PRO")
inletsOperator.Flags().StringP("license", "l", "", "The license key for inlets")
inletsOperator.Flags().StringP("license-file", "f", "$HOME/.inlets/LICENSE", "Path to license JWT file for inlets")

inletsOperator.Flags().StringP("provider", "p", "digitalocean", "Your infrastructure provider - 'equinix-metal', 'digitalocean', 'scaleway', 'linode', 'civo', 'gce', 'ec2', 'azure', 'hetzner'")
inletsOperator.Flags().StringP("provider", "p", "digitalocean", "Your infrastructure provider - 'digitalocean', 'scaleway', 'linode', 'gce', 'ec2', 'azure', 'hetzner'")
inletsOperator.Flags().StringP("zone", "z", "us-central1-a", "The zone to provision the exit node (GCE)")
inletsOperator.Flags().String("project-id", "", "Project ID to be used (for GCE and Equinix Metal)")
inletsOperator.Flags().StringP("region", "r", "lon1", "The default region to provision the exit node (DigitalOcean, Equinix Metal and Scaleway)")
Expand Down Expand Up @@ -170,7 +170,7 @@ IngressController`,
licenseFile, _ := command.Flags().GetString("license-file")
fileFlagChanged := command.Flags().Changed("license-file")

noLicenseErr := fmt.Errorf("--license or --license-file is required for inlets PRO")
noLicenseErr := fmt.Errorf("--license or --license-file is required for inlets")
if len(license) == 0 {
if len(licenseFile) > 0 {
licenseFile = os.ExpandEnv(licenseFile)
Expand Down Expand Up @@ -320,7 +320,7 @@ func getInletsOperatorOverrides(command *cobra.Command) (map[string]string, erro
return overrides, fmt.Errorf("region is required for provider %s", provider)
}

validHetznerRegions := []string{"fsn1", "nbg1", "hel1"}
validHetznerRegions := []string{"fsn1", "nbg1", "hel1", "eu-central"}
foundRegion := false
for _, validRegion := range validHetznerRegions {
if validRegion == userInputRegion {
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions cmd/apps/openfaas_ingress_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func MakeInstallOpenFaaSIngress() *cobra.Command {
}

func createIssuer(domain, email, ingressClass, ingressName string, staging bool, clusterIssuer bool, namespace string) error {
yamlBytes, templateErr := buildIssuerYAML(domain, email, ingressClass, ingressName, staging, clusterIssuer, namespace)
yamlBytes, templateErr := buildIssuerYAML(email, ingressClass, staging, clusterIssuer, namespace)
if templateErr != nil {
log.Print("Unable to install the application. Could not build the templated yaml file for the resources")
return templateErr
Expand All @@ -132,7 +132,7 @@ func createIssuer(domain, email, ingressClass, ingressName string, staging bool,
}

if res.ExitCode != 0 {
return fmt.Errorf(`Unable to apply YAML files.
return fmt.Errorf(`unable to apply YAML files.
Have you got OpenFaaS running in the openfaas namespace and cert-manager 1.0.0 or higher installed in cert-manager namespace? %s`,
res.Stderr)
}
Expand Down Expand Up @@ -237,7 +237,7 @@ func buildOpenfaasIngressYAML(domain, email, ingressClass, ingressName string, s
return tpl.Bytes(), nil
}

func buildIssuerYAML(domain, email, ingressClass, ingressName string, staging, clusterIssuer bool, namespace string) ([]byte, error) {
func buildIssuerYAML(email, ingressClass string, staging, clusterIssuer bool, namespace string) ([]byte, error) {
templ, err := template.New("issuer-yaml").Parse(http01IssuerTemplate)

if err != nil {
Expand Down

0 comments on commit 2d35a89

Please sign in to comment.