forked from nephio-project/porch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
775fa5c
commit 442d071
Showing
47 changed files
with
684 additions
and
3 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
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,27 @@ | ||
apiVersion: kpt.dev/v1 | ||
kind: Kptfile | ||
metadata: | ||
name: backend | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
upstream: | ||
type: git | ||
git: | ||
repo: https://github.com/droot/pkg-catalog.git | ||
directory: basens | ||
ref: basens/v0 | ||
upstreamLock: | ||
type: git | ||
git: | ||
repo: https://github.com/droot/pkg-catalog.git | ||
directory: basens | ||
ref: basens/v0 | ||
commit: b3e1d439516a5e8d49adc0c82d3e95578570dbfa | ||
info: | ||
description: kpt package for provisioning namespace | ||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/set-namespace:v0.3.4 | ||
configPath: package-context.yaml | ||
- image: gcr.io/kpt-fn/apply-replacements:v0.1.0 | ||
configPath: update-rolebinding.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,21 @@ | ||
# basens | ||
|
||
## Description | ||
kpt package for provisioning namespace | ||
|
||
## Usage | ||
|
||
### Fetch the package | ||
`kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] basens` | ||
Details: https://kpt.dev/reference/cli/pkg/get/ | ||
|
||
### View package content | ||
`kpt pkg tree basens` | ||
Details: https://kpt.dev/reference/cli/pkg/tree/ | ||
|
||
### Apply the package | ||
``` | ||
kpt live init basens | ||
kpt live apply basens --reconcile-timeout=2m --output=table | ||
``` | ||
Details: https://kpt.dev/reference/cli/live/ |
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,5 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: # kpt-merge: example | ||
name: backend | ||
spec: {} |
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: backend |
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,9 @@ | ||
apiVersion: v1 | ||
kind: ResourceQuota | ||
metadata: # kpt-merge: example/default | ||
name: default | ||
namespace: backend | ||
spec: | ||
hard: | ||
cpu: "40" | ||
memory: 40G |
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: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: # kpt-merge: example/app-admin | ||
name: app-admin | ||
namespace: backend | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: app-admin | ||
subjects: | ||
- apiGroup: rbac.authorization.k8s.io | ||
kind: Group | ||
name: backend.admin@bigco.com |
20 changes: 20 additions & 0 deletions
20
pkg/repository/testdata/update/local/update-rolebinding.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: fn.kpt.dev/v1alpha1 | ||
kind: ApplyReplacements | ||
metadata: # kpt-merge: example/update-rolebinding | ||
name: update-rolebinding | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
replacements: | ||
- source: | ||
kind: ConfigMap | ||
name: kptfile.kpt.dev | ||
fieldPath: data.name | ||
targets: | ||
- select: | ||
name: app-admin | ||
kind: RoleBinding | ||
fieldPaths: | ||
- subjects.[kind=Group].name | ||
options: | ||
delimiter: '.' | ||
index: 0 |
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,14 @@ | ||
apiVersion: kpt.dev/v1 | ||
kind: Kptfile | ||
metadata: | ||
name: basens | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
info: | ||
description: kpt package for provisioning namespace | ||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/set-namespace:v0.3.4 | ||
configPath: package-context.yaml | ||
- image: gcr.io/kpt-fn/apply-replacements:v0.1.0 | ||
configPath: update-rolebinding.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,21 @@ | ||
# basens | ||
|
||
## Description | ||
kpt package for provisioning namespace | ||
|
||
## Usage | ||
|
||
### Fetch the package | ||
`kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] basens` | ||
Details: https://kpt.dev/reference/cli/pkg/get/ | ||
|
||
### View package content | ||
`kpt pkg tree basens` | ||
Details: https://kpt.dev/reference/cli/pkg/tree/ | ||
|
||
### Apply the package | ||
``` | ||
kpt live init basens | ||
kpt live apply basens --reconcile-timeout=2m --output=table | ||
``` | ||
Details: https://kpt.dev/reference/cli/live/ |
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,5 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: example | ||
spec: {} |
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,9 @@ | ||
apiVersion: v1 | ||
kind: ResourceQuota | ||
metadata: | ||
name: default | ||
namespace: example | ||
spec: | ||
hard: | ||
cpu: "40" | ||
memory: 40G |
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: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: app-admin | ||
namespace: example | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: app-admin | ||
subjects: | ||
- apiGroup: rbac.authorization.k8s.io | ||
kind: Group | ||
name: example.admin@bigco.com |
20 changes: 20 additions & 0 deletions
20
pkg/repository/testdata/update/original/update-rolebinding.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: fn.kpt.dev/v1alpha1 | ||
kind: ApplyReplacements | ||
metadata: | ||
name: update-rolebinding | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
replacements: | ||
- source: | ||
kind: ConfigMap | ||
name: kptfile.kpt.dev | ||
fieldPath: data.name | ||
targets: | ||
- select: | ||
name: app-admin | ||
kind: RoleBinding | ||
fieldPaths: | ||
- subjects.[kind=Group].name | ||
options: | ||
delimiter: '.' | ||
index: 0 |
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,27 @@ | ||
apiVersion: kpt.dev/v1 | ||
kind: Kptfile | ||
metadata: | ||
name: backend | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
upstream: | ||
type: git | ||
git: | ||
repo: https://github.com/droot/pkg-catalog.git | ||
directory: basens | ||
ref: basens/v0 | ||
upstreamLock: | ||
type: git | ||
git: | ||
repo: https://github.com/droot/pkg-catalog.git | ||
directory: basens | ||
ref: basens/v0 | ||
commit: b3e1d439516a5e8d49adc0c82d3e95578570dbfa | ||
info: | ||
description: kpt package for provisioning namespace | ||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/set-namespace:v0.3.4 | ||
configPath: package-context.yaml | ||
- image: gcr.io/kpt-fn/apply-replacements:v0.1.0 | ||
configPath: update-rolebinding.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,21 @@ | ||
# basens | ||
|
||
## Description | ||
kpt package for provisioning namespace | ||
|
||
## Usage | ||
|
||
### Fetch the package | ||
`kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] basens` | ||
Details: https://kpt.dev/reference/cli/pkg/get/ | ||
|
||
### View package content | ||
`kpt pkg tree basens` | ||
Details: https://kpt.dev/reference/cli/pkg/tree/ | ||
|
||
### Apply the package | ||
``` | ||
kpt live init basens | ||
kpt live apply basens --reconcile-timeout=2m --output=table | ||
``` | ||
Details: https://kpt.dev/reference/cli/live/ |
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,5 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: # kpt-merge: example | ||
name: backend | ||
spec: {} |
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: backend |
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,9 @@ | ||
apiVersion: v1 | ||
kind: ResourceQuota | ||
metadata: # kpt-merge: example/default | ||
name: default | ||
namespace: backend | ||
spec: | ||
hard: | ||
cpu: "40" | ||
memory: 60G |
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: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: # kpt-merge: example/app-admin | ||
name: app-admin | ||
namespace: backend | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: app-admin | ||
subjects: | ||
- apiGroup: rbac.authorization.k8s.io | ||
kind: Group | ||
name: backend.admin@bigco.com |
20 changes: 20 additions & 0 deletions
20
pkg/repository/testdata/update/updated/update-rolebinding.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: fn.kpt.dev/v1alpha1 | ||
kind: ApplyReplacements | ||
metadata: # kpt-merge: example/update-rolebinding | ||
name: update-rolebinding | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
replacements: | ||
- source: | ||
kind: ConfigMap | ||
name: kptfile.kpt.dev | ||
fieldPath: data.name | ||
targets: | ||
- select: | ||
name: app-admin | ||
kind: RoleBinding | ||
fieldPaths: | ||
- subjects.[kind=Group].name | ||
options: | ||
delimiter: '.' | ||
index: 0 |
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,14 @@ | ||
apiVersion: kpt.dev/v1 | ||
kind: Kptfile | ||
metadata: | ||
name: basens | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
info: | ||
description: kpt package for provisioning namespace | ||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/set-namespace:v0.3.4 | ||
configPath: package-context.yaml | ||
- image: gcr.io/kpt-fn/apply-replacements:v0.1.0 | ||
configPath: update-rolebinding.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,21 @@ | ||
# basens | ||
|
||
## Description | ||
kpt package for provisioning namespace | ||
|
||
## Usage | ||
|
||
### Fetch the package | ||
`kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] basens` | ||
Details: https://kpt.dev/reference/cli/pkg/get/ | ||
|
||
### View package content | ||
`kpt pkg tree basens` | ||
Details: https://kpt.dev/reference/cli/pkg/tree/ | ||
|
||
### Apply the package | ||
``` | ||
kpt live init basens | ||
kpt live apply basens --reconcile-timeout=2m --output=table | ||
``` | ||
Details: https://kpt.dev/reference/cli/live/ |
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,5 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: example | ||
spec: {} |
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,9 @@ | ||
apiVersion: v1 | ||
kind: ResourceQuota | ||
metadata: | ||
name: default | ||
namespace: example | ||
spec: | ||
hard: | ||
cpu: "40" | ||
memory: 60G |
Oops, something went wrong.