-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from electrocucaracha/add_oai_cluster-workload
Add OAI cluster workload package
- Loading branch information
Showing
14 changed files
with
262 additions
and
0 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,12 @@ | ||
apiVersion: kpt.dev/v1 | ||
kind: Kptfile | ||
metadata: | ||
name: workload-cluster | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
info: | ||
description: nephio workload cluster package | ||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/apply-replacements:v0.1.1 | ||
configPath: apply-replacements.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,15 @@ | ||
# workload-cluster | ||
|
||
## Description | ||
|
||
Deploying this package to the Nephio management cluster will result in the | ||
provisioning of a workload cluster, associated repository, tokens, secrets, | ||
and other resources needed to fully register the new cluster with Nephio. | ||
|
||
To accomplish this, the package will deploy two additional packages to the management | ||
cluster repo (one for the cluster and one for the repository) and two additional packages | ||
to the management staging repo (one for configsync and one for rootsync). | ||
The names of those packages will be based on the name of the cluster-name. So, if this package | ||
is cloned to the name "cluster-01", it will deploy two additional packages, | ||
"cluster-01-cluster", "cluster-01-repo", "cluster-01-rootsync" and "cluster-01-configsync" | ||
|
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,30 @@ | ||
apiVersion: fn.kpt.dev/v1alpha1 | ||
kind: ApplyReplacements | ||
metadata: | ||
name: propagate-name | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
replacements: | ||
- source: | ||
kind: ConfigMap | ||
name: kptfile.kpt.dev | ||
fieldPath: data.name | ||
targets: | ||
- select: | ||
kind: PackageVariant | ||
fieldPaths: | ||
- metadata.name | ||
- spec.downstream.package | ||
options: | ||
delimiter: '-' | ||
index: 0 | ||
- select: | ||
kind: PackageVariant | ||
fieldPaths: | ||
- spec.injectors.[kind=WorkloadCluster].name | ||
- spec.pipeline.mutators.[image=gcr.io/kpt-fn/set-annotations:v0.1.4].configMap.[nephio.org/cluster-name] | ||
- select: | ||
kind: WorkloadCluster | ||
fieldPaths: | ||
- metadata.name | ||
- spec.clusterName |
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,8 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: kptfile.kpt.dev | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
data: | ||
name: example |
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,22 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: PackageVariant | ||
metadata: | ||
name: example-cluster | ||
spec: | ||
annotations: | ||
approval.nephio.org/policy: initial | ||
upstream: | ||
package: cluster-capi-kind | ||
repo: nephio-example-packages | ||
revision: v5 | ||
downstream: | ||
package: example-cluster | ||
repo: mgmt | ||
injectors: | ||
- kind: WorkloadCluster | ||
name: example | ||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/set-annotations:v0.1.4 | ||
configMap: | ||
nephio.org/cluster-name: example |
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,19 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: PackageVariant | ||
metadata: | ||
name: example-configsync | ||
spec: | ||
annotations: | ||
approval.nephio.org/policy: initial | ||
upstream: | ||
package: configsync | ||
repo: nephio-example-packages | ||
revision: v1 | ||
downstream: | ||
package: example-configsync | ||
repo: mgmt-staging | ||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/set-annotations:v0.1.4 | ||
configMap: | ||
nephio.org/cluster-name: example |
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,19 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: PackageVariant | ||
metadata: | ||
name: example-kindnet | ||
spec: | ||
annotations: | ||
approval.nephio.org/policy: initial | ||
upstream: | ||
package: kindnet | ||
repo: nephio-example-packages | ||
revision: v1 | ||
downstream: | ||
package: example-kindnet | ||
repo: mgmt-staging | ||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/set-annotations:v0.1.4 | ||
configMap: | ||
nephio.org/cluster-name: example |
20 changes: 20 additions & 0 deletions
20
workloads/oai/workload-cluster/pv-local-path-provisioner.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,20 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: PackageVariant | ||
metadata: | ||
name: example-local-path-provisioner | ||
spec: | ||
annotations: | ||
approval.nephio.org/policy: initial | ||
upstream: | ||
package: local-path-provisioner | ||
repo: nephio-example-packages | ||
revision: v1 | ||
downstream: | ||
package: example-local-path-provisioner | ||
repo: mgmt-staging | ||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/set-annotations:v0.1.4 | ||
configMap: | ||
nephio.org/cluster-name: example | ||
|
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,19 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: PackageVariant | ||
metadata: | ||
name: example-metallb | ||
spec: | ||
annotations: | ||
approval.nephio.org/policy: initial | ||
upstream: | ||
package: metallb | ||
repo: nephio-example-packages | ||
revision: v1 | ||
downstream: | ||
package: example-metallb | ||
repo: mgmt-staging | ||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/set-annotations:v0.1.4 | ||
configMap: | ||
nephio.org/cluster-name: example |
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,19 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: PackageVariant | ||
metadata: | ||
name: example-multus | ||
spec: | ||
annotations: | ||
approval.nephio.org/policy: initial | ||
upstream: | ||
package: multus | ||
repo: nephio-example-packages | ||
revision: v1 | ||
downstream: | ||
package: example-multus | ||
repo: mgmt-staging | ||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/set-annotations:v0.1.4 | ||
configMap: | ||
nephio.org/cluster-name: example |
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,22 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: PackageVariant | ||
metadata: | ||
name: example-repo | ||
spec: | ||
annotations: | ||
approval.nephio.org/policy: initial | ||
upstream: | ||
package: repository | ||
repo: nephio-example-packages | ||
revision: v3 | ||
downstream: | ||
package: example-repo | ||
repo: mgmt | ||
injectors: | ||
- kind: WorkloadCluster | ||
name: example | ||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/set-annotations:v0.1.4 | ||
configMap: | ||
nephio.org/cluster-name: example |
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,22 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: PackageVariant | ||
metadata: | ||
name: example-rootsync | ||
spec: | ||
annotations: | ||
approval.nephio.org/policy: initial | ||
upstream: | ||
package: rootsync | ||
repo: nephio-example-packages | ||
revision: v3 | ||
downstream: | ||
package: example-rootsync | ||
repo: mgmt-staging | ||
injectors: | ||
- kind: WorkloadCluster | ||
name: example | ||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/set-annotations:v0.1.4 | ||
configMap: | ||
nephio.org/cluster-name: example |
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,22 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: PackageVariant | ||
metadata: | ||
name: example-vlanindex | ||
spec: | ||
annotations: | ||
approval.nephio.org/policy: initial | ||
upstream: | ||
package: vlanindex | ||
repo: nephio-example-packages | ||
revision: v1 | ||
downstream: | ||
package: example-vlanindex | ||
repo: mgmt | ||
injectors: | ||
- kind: WorkloadCluster | ||
name: example | ||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/set-annotations:v0.1.4 | ||
configMap: | ||
nephio.org/cluster-name: example |
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: infra.nephio.org/v1alpha1 | ||
kind: WorkloadCluster | ||
metadata: | ||
name: example | ||
spec: | ||
# Since injection only injects the spec, we need the name here as | ||
# well as in metadata. | ||
clusterName: example | ||
cnis: | ||
- macvlan | ||
- ipvlan | ||
- sriov | ||
masterInterface: eth1 |