Skip to content

Commit

Permalink
Merge pull request #47 from Peefy/update-copyright
Browse files Browse the repository at this point in the history
chore: update copyright
  • Loading branch information
Peefy authored Sep 5, 2024
2 parents ca1c724 + 4e7277b commit 3dc6830
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ $(ENVTEST): $(LOCALBIN)
.PHONY: bundle
bundle: manifests kustomize ## Generate bundle manifests and metadata, then validate generated files.
operator-sdk generate kustomize manifests -q
cd config/webhook && $(KUSTOMIZE) edit set image controller=$(IMG)
cd config/webhook && $(KUSTOMIZE) edit set image kcl-webhook-server=$(IMG)
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
operator-sdk bundle validate ./bundle

Expand Down
2 changes: 1 addition & 1 deletion api/kclrun/v1alpha1/kclrun_types.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023.
Copyright 2023 The KCL Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion api/kclrun/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/kclrun/v1alpha1/zz_generated.register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 13 additions & 3 deletions cmd/webhook-init/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,16 @@ func main() {
Bytes: caBytes,
})

dnsNames := []string{"webhook-service",
"webhook-service.default", "webhook-service.default.svc"}
commonName := "webhook-service.default.svc"
var (
webhookService, _ = os.LookupEnv("WEBHOOK_SERVICE")
)
if webhookService == "" {
webhookService = "webhook-service"
}

commonName := fmt.Sprintf("%s.default.svc", webhookService)
dnsNames := []string{webhookService,
fmt.Sprintf("%s.default", webhookService), commonName}

// server cert config
cert := &x509.Certificate{
Expand Down Expand Up @@ -178,6 +185,9 @@ func createMutationConfig(caCert *bytes.Buffer) error {
mutationCfgName, _ = os.LookupEnv("MUTATE_CONFIG")
webhookService, _ = os.LookupEnv("WEBHOOK_SERVICE")
)
if webhookService == "" {
webhookService = "webhook-service"
}
config := ctrl.GetConfigOrDie()
kubeClient, err := kubernetes.NewForConfig(config)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion hack/boilerplate.go.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023.
Copyright 2023 The KCL Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 3dc6830

Please sign in to comment.