-
Notifications
You must be signed in to change notification settings - Fork 154
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
feat(service-mesh): adds service mesh authz support for Dashboard and Workbenches #605
Closed
bartoszmajsak
wants to merge
60
commits into
opendatahub-io:incubation
from
maistra:service-mesh-integration
Closed
Changes from 16 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
2298a07
feat(service-mesh): adds service mesh support
bartoszmajsak 0d509b6
feat: parameterizes gateway namespace for kubeflow
cam-garrison 556d29a
remove unused SM overlay call, restore KF repo manifests
cam-garrison b73db55
feat(cert): self-signed cert allows wildcards
bartoszmajsak c7fc306
fix(bundle): regenerates the bundle after refactoring
bartoszmajsak d7f2a69
fix(rbac): corrects rbac for featuretracker after refactoring
bartoszmajsak 3da5f7d
chore: moves RFC1123 logic to common
bartoszmajsak cb6ca7c
fix: removes NameValue overwrite option
bartoszmajsak 8e5747e
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak f949417
chore: reuses cluster.CreateNamespace for feature-owned ns
bartoszmajsak 7faf4a5
chore(script): removes unused vars
bartoszmajsak 97197ba
fix: use ns name...
bartoszmajsak cfdf708
fix: clearly cannot exit vim
bartoszmajsak 713cb0d
feat: moves initializer to feature pkg
bartoszmajsak 103993f
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak 28e04f6
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak dccc530
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak c0e39de
chore(dsci): moves service mesh setup to its own file
bartoszmajsak c335c12
chore(dashboard): moves service mesh setup to its own file
bartoszmajsak a04e602
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak a43866b
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak e3ce5e5
chore: removes unneeded authorino name - no other provided is foresee…
bartoszmajsak a5e534d
feat: adds conditional enabled to fluent API
bartoszmajsak 206f59a
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak 4578f24
fix: apply service mesh setup after dashboard resources are created
bartoszmajsak 5f4d5ef
fix: patches auth-provider deployment to enable istio injection
bartoszmajsak 5cb4533
chore: moves ApplyManifest to feature.go
bartoszmajsak 6675aa2
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak de84dfa
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak b307a2a
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak 1baef84
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak 05847de
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak b0d2ccd
fix(tmpl): restores removed ns patch
bartoszmajsak 351fc7e
chore: prefixes features to hold component/infra name
bartoszmajsak 9097c6d
fix: sets default secret name if not defined
bartoszmajsak f8e1c07
fix(crd): updates spec
bartoszmajsak 0bd6ab9
fix: sets scc to restricted
bartoszmajsak fea0569
fix(config): makes rest config loader more flexible
bartoszmajsak 7c66f84
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak ad562f7
chore: simplifies rest config
bartoszmajsak c6363fb
chore: removes unused smcp template
bartoszmajsak 16c9a17
chore: renames istio resources to use opendatahub prefix instead of odh
bartoszmajsak 38232ee
chore: keeps repositories in the tmp dir
bartoszmajsak e4fda33
fix(image): merges manifests builder stages to one
bartoszmajsak 109fecd
chore: bumps default Authorino image
bartoszmajsak 7924666
feat(authz): reworks authconfig
bartoszmajsak a86f58b
add table of contents to readme (#769)
AjayJagan 0ed30a2
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak edf0ebc
Process SM related templates in memory (#15)
cam-garrison 655a27c
feat: add conditions to FeatureTracker customer resource (#16)
cam-garrison 3b303bd
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak ac524f7
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak 74d8eb5
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak 1ed1206
fix(lint): adjusts code based on latest linter settings
bartoszmajsak 3043c64
feat: enhances FeatureTracker with spec (#17)
cam-garrison cb1f013
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak 9b89a0c
fix(manifests): return walkErr immediately
bartoszmajsak 7920590
fix: uses proper template location
bartoszmajsak 76a0313
Merge branch 'incubation' into service-mesh-integration
bartoszmajsak 98049d8
fix(templ): corrects metrics folder location
bartoszmajsak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,80 @@ | ||
package v1 | ||
|
||
import ( | ||
operatorv1 "github.com/openshift/api/operator/v1" | ||
) | ||
|
||
// ServiceMeshSpec configures Service Mesh. | ||
type ServiceMeshSpec struct { | ||
// +kubebuilder:validation:Enum=Managed;Removed | ||
// +kubebuilder:default=Removed | ||
ManagementState operatorv1.ManagementState `json:"managementState,omitempty"` | ||
// Mesh holds configuration of Service Mesh used by Opendatahub. | ||
Mesh MeshSpec `json:"mesh,omitempty"` | ||
// Auth holds configuration of authentication and authorization services | ||
// used by Service Mesh in Opendatahub. | ||
Auth AuthSpec `json:"auth,omitempty"` | ||
} | ||
|
||
type MeshSpec struct { | ||
// Name is a name Service Mesh Control Plan. Defaults to "basic". | ||
// +kubebuilder:default=basic | ||
Name string `json:"name,omitempty"` | ||
// Namespace is a namespace where Service Mesh is deployed. Defaults to "istio-system". | ||
// +kubebuilder:default=istio-system | ||
Namespace string `json:"namespace,omitempty"` | ||
// Certificate allows to define how to use certificates for the Service Mesh communication. | ||
Certificate CertSpec `json:"certificate,omitempty"` | ||
} | ||
|
||
type CertSpec struct { | ||
// Name of the certificate to be used by Service Mesh. | ||
// +kubebuilder:default=opendatahub-dashboard-cert | ||
Name string `json:"name,omitempty"` | ||
// Generate indicates if the certificate should be generated. If set to false | ||
// it will assume certificate with the given name is made available as a secret | ||
// in Service Mesh namespace. | ||
// +kubebuilder:default=true | ||
Generate bool `json:"generate,omitempty"` | ||
} | ||
|
||
type AuthSpec struct { | ||
// Name of the authorization provider used for Service Mesh. | ||
// +kubebuilder:default=authorino | ||
Name string `json:"name,omitempty"` | ||
// Namespace where it is deployed. | ||
// +kubebuilder:default=auth-provider | ||
Namespace string `json:"namespace,omitempty"` | ||
// Authorino holds configuration of Authorino service used as external authorization provider. | ||
Authorino AuthorinoSpec `json:"authorino,omitempty"` | ||
} | ||
|
||
type AuthorinoSpec struct { | ||
// Name specifies how external authorization provider should be called. | ||
// +kubebuilder:default=authorino-mesh-authz-provider | ||
Name string `json:"name,omitempty"` | ||
// Audiences is a list of the identifiers that the resource server presented | ||
// with the token identifies as. Audience-aware token authenticators will verify | ||
// that the token was intended for at least one of the audiences in this list. | ||
// If no audiences are provided, the audience will default to the audience of the | ||
// Kubernetes apiserver (kubernetes.default.svc). | ||
// +kubebuilder:default={"https://kubernetes.default.svc"} | ||
Audiences []string `json:"audiences,omitempty"` | ||
// Label narrows amount of AuthConfigs to process by Authorino service. | ||
// +kubebuilder:default=authorino/topic=odh | ||
Label string `json:"label,omitempty"` | ||
// Image allows to define a custom container image to be used when deploying Authorino's instance. | ||
// +kubebuilder:default="quay.io/kuadrant/authorino:v0.13.0" | ||
Image string `json:"image,omitempty"` | ||
} | ||
|
||
// TODO move logic to sth like management state | ||
// IsValid returns true if the spec is a valid and complete. | ||
// If invalid it provides message with the reasons. | ||
func (s *ServiceMeshSpec) IsValid() (bool, string) { | ||
if s.Auth.Name != "authorino" { | ||
return false, "currently only Authorino is available as authorization layer" | ||
} | ||
|
||
return true, "" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really sure what this image is here for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps more a
DevFlag
thing in the retrospect. Up for discussion. This new part of the spec is a slimmed version of #515