This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 125
Create 'Service' CRD to register and reference k8s and non-k8s compute resources #67
Closed
Closed
Changes from all commits
Commits
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,49 @@ sources: | |
- kind: ServiceAccount | ||
name: prometheus | ||
namespace: default | ||
- kind: Service | ||
name: foo.mesh | ||
- kind: Service | ||
name: bar.mesh | ||
- kind: Service | ||
name: baz.mesh | ||
Comment on lines
+76
to
+81
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you reference this as TrafficSplit as I feel it is a more compelling example for this proposal? |
||
``` | ||
|
||
```yaml | ||
# Register a service 'foo.mesh' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @delqn - this has the facility to use different source types (e.g. a Kubernetes Service, DNS name, Azure resource name). But does it allow users to also use these types for the destination? This will allow creation of access policies for applications running in VMs, for e.g. |
||
# The service is sesolvable by DNS | ||
apiVersion: specs.smi-spec.io/v1alpha1 | ||
kind: Service | ||
metadata: | ||
name: foo.mesh | ||
spec: | ||
type: DNS | ||
``` | ||
|
||
```yaml | ||
# Register a service already existing within the Kubernetes cluster | ||
apiVersion: specs.smi-spec.io/v1alpha1 | ||
kind: Service | ||
metadata: | ||
name: bar.mesh | ||
spec: | ||
type: Kubernetes | ||
cluster: aks-4d61b17c.hcp.westus2.azmk8s.io | ||
locator: /namespace/default/service/bar | ||
``` | ||
|
||
```yaml | ||
# Register a service consisting of a specific cloud vendor's component | ||
# Members of the service (IP addresses) are resolvable by querying the | ||
# particular cloud provider (type) for the given resource (locator) | ||
apiVersion: specs.smi-spec.io/v1alpha1 | ||
kind: Service | ||
metadata: | ||
name: baz.mesh | ||
spec: | ||
type: Azure | ||
locator: /resource/subscriptions/e3f0/resourceGroups/mesh-rg/providers/Microsoft.Compute/virtualMachineScaleSets/baz | ||
port: 7654 | ||
``` | ||
|
||
This example selects all the pods which have the `service-a` `ServiceAccount`. | ||
|
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.
In the main write-up you mentioned about supporting both ServiceAccount and service. Users can use what they want. Can users use only service name even for single K8S clusters?