forked from opendatahub-io/opendatahub-operator
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: separate templates (opendatahub-io#932)
* init commit * move const, move comment * remove unused fixture * Update components/kserve/feature_templates.go Co-authored-by: Bartosz Majsak <[email protected]> * make template structure consistent from review * only check basepath for tmpl * re-add template test * make ManifestSource required to call Manifest * fix linter? * make review changes * lint post rebase * preserve prior manifest order --------- Co-authored-by: Bartosz Majsak <[email protected]>
- Loading branch information
1 parent
45afe5f
commit 9df56a0
Showing
31 changed files
with
148 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package kserve | ||
|
||
import ( | ||
"embed" | ||
"io/fs" | ||
"path" | ||
) | ||
|
||
//go:embed resources | ||
var kserveEmbeddedFS embed.FS | ||
|
||
const baseDir = "resources" | ||
|
||
var Resources = struct { | ||
// ServiceMeshDir is the path to the Service Mesh templates. | ||
ServiceMeshDir string | ||
// InstallDir is the path to the Serving install templates. | ||
InstallDir string | ||
// GatewaysDir is the path to the Serving Istio gateways templates. | ||
GatewaysDir string | ||
// Source the templates to be used | ||
Source fs.FS | ||
// BaseDir is the path to the base of the embedded FS | ||
BaseDir string | ||
}{ | ||
ServiceMeshDir: path.Join(baseDir, "servicemesh"), | ||
InstallDir: path.Join(baseDir, "serving-install"), | ||
GatewaysDir: path.Join(baseDir, "servicemesh", "routing"), | ||
Source: kserveEmbeddedFS, | ||
BaseDir: baseDir, | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package dscinitialization | ||
|
||
import ( | ||
"embed" | ||
"io/fs" | ||
"path" | ||
) | ||
|
||
//go:embed resources | ||
var dsciEmbeddedFS embed.FS | ||
|
||
const baseDir = "resources" | ||
|
||
var Templates = struct { | ||
// ServiceMeshDir is the path to the Service Mesh templates. | ||
ServiceMeshDir string | ||
// InstallDir is the path to the Serving install templates. | ||
AuthorinoDir string | ||
// GatewaysDir is the path to the Serving Istio gateways templates. | ||
MetricsDir string | ||
// Source the templates to be used | ||
Source fs.FS | ||
// BaseDir is the path to the base of the embedded FS | ||
BaseDir string | ||
}{ | ||
ServiceMeshDir: path.Join(baseDir, "servicemesh"), | ||
AuthorinoDir: path.Join(baseDir, "authorino"), | ||
MetricsDir: path.Join(baseDir, "metrics-collection"), | ||
Source: dsciEmbeddedFS, | ||
BaseDir: baseDir, | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tests/integration/features/fixtures/templates/local-gateway-svc.tmpl.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
experimental.istio.io/disable-gateway-port-translation: "true" | ||
name: knative-local-gateway | ||
namespace: {{ .ControlPlane.Namespace }} | ||
spec: | ||
ports: | ||
- name: http2 | ||
port: 80 | ||
protocol: TCP | ||
targetPort: 8081 | ||
selector: | ||
knative: ingressgateway | ||
type: ClusterIP |
13 changes: 13 additions & 0 deletions
13
tests/integration/features/fixtures/templates/mesh-authz-ext-provider.patch.tmpl.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: maistra.io/v2 | ||
kind: ServiceMeshControlPlane | ||
metadata: | ||
name: {{ .ControlPlane.Name }} | ||
namespace: {{ .ControlPlane.Namespace }} | ||
spec: | ||
techPreview: | ||
meshConfig: | ||
extensionProviders: | ||
- name: {{ .AppNamespace }}-auth-provider | ||
envoyExtAuthzGrpc: | ||
service: {{ .AuthProviderName }}-authorino-authorization.{{ .Auth.Namespace }}.svc.cluster.local | ||
port: 50051 |
Oops, something went wrong.