forked from GoogleCloudPlatform/k8s-config-connector
-
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.
Merge pull request GoogleCloudPlatform#1834 from barney-s/grpc-integr…
…ate3 Integrate GRPC based expander into the composition engine
- Loading branch information
Showing
12 changed files
with
334 additions
and
9 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
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
144 changes: 144 additions & 0 deletions
144
...riments/compositions/composition/tests/data/TestSimpleCompositionExpansionGrpc/input.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,144 @@ | ||
# Copyright 2024 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: pconfigs.facade.foocorp.com | ||
spec: | ||
group: facade.foocorp.com | ||
names: | ||
kind: PConfig | ||
listKind: PConfigList | ||
plural: pconfigs | ||
singular: pconfig | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: Schema for the pconfig | ||
properties: | ||
apiVersion: | ||
description: api-version of api | ||
type: string | ||
kind: | ||
description: gvk Kind | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: PConfig spec | ||
properties: | ||
project: | ||
type: string | ||
required: | ||
- project | ||
type: object | ||
status: | ||
description: PConfig status | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: composition-facade-foocorp | ||
rules: | ||
- apiGroups: | ||
- facade.foocorp.com | ||
resources: | ||
- '*' | ||
verbs: | ||
- get | ||
- list | ||
- patch | ||
- update | ||
- watch | ||
- create | ||
- delete | ||
- apiGroups: | ||
- facade.foocorp.com | ||
resources: | ||
- "*/status" | ||
verbs: | ||
- get | ||
- update | ||
- apiGroups: ["*"] | ||
resources: ["*"] | ||
verbs: ["*"] | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: composition-facade-foocorp | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: composition-facade-foocorp | ||
subjects: | ||
- kind: ServiceAccount | ||
name: composition-controller-manager | ||
namespace: composition-system | ||
--- | ||
apiVersion: composition.google.com/v1alpha1 | ||
kind: Composition | ||
metadata: | ||
name: projectconfigmap | ||
namespace: default | ||
spec: | ||
inputAPIGroup: pconfigs.facade.foocorp.com | ||
expanders: | ||
- type: gjinja2 | ||
name: project | ||
template: | | ||
{% set hostProject = 'compositions-foobar' %} | ||
{% set managedProject = pconfigs.spec.project %} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ managedProject }} | ||
namespace: {{ pconfigs.metadata.namespace }} | ||
labels: | ||
createdby: "composition-namespaceconfigmap" | ||
data: | ||
name: {{ managedProject }} | ||
billingAccountRef: "010101-ABABCD-BCAB11" | ||
folderRef: "000000111100" | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: team-a | ||
--- | ||
apiVersion: composition.google.com/v1alpha1 | ||
kind: Context | ||
metadata: | ||
name: context | ||
namespace: team-a | ||
spec: | ||
project: proj-a | ||
--- | ||
apiVersion: facade.foocorp.com/v1alpha1 | ||
kind: PConfig | ||
metadata: | ||
name: team-a-config | ||
namespace: team-a | ||
spec: | ||
project: proj-a |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.