Skip to content

Commit 22645fa

Browse files
committed
Add porch installation and Config sync installation from porch
1 parent 32602a8 commit 22645fa

27 files changed

+2590
-1
lines changed

infra/environment/project.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ spec:
2121
displayName: packagename
2222
folderRef:
2323
name: environments
24-
namepace: environments-ns
2524

2625
---
2726

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: config.porch.kpt.dev/v1alpha1
2+
kind: RemoteRootSyncSet
3+
metadata:
4+
name: porch-install
5+
namespace: dev
6+
spec:
7+
clusterRefs:
8+
- apiVersion: container.cnrm.cloud.google.com/v1beta1
9+
kind: ContainerCluster
10+
name: us-central1
11+
namespace: dev
12+
template:
13+
sourceFormat: unstructured
14+
oci:
15+
repository: gcr.io/yuwenma-gke-catalyst-goog-rlol/porch:v0.1
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: config.porch.kpt.dev/v1alpha1
2+
kind: RootSyncSet
3+
metadata:
4+
name: porch-install
5+
namespace: dev
6+
spec:
7+
clusterRefs:
8+
- apiVersion: container.cnrm.cloud.google.com/v1beta1
9+
kind: ContainerCluster
10+
name: us-central1
11+
namespace: dev
12+
template:
13+
spec:
14+
sourceFormat: unstructured
15+
git:
16+
auth: none
17+
repo: http://github.com/GoogleContainerTools/kpt-samples.git
18+
branch: dogfood-porch-installation
19+
dir: infra/porch/from-yaml

infra/porch/from-yaml/crds/Kptfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: kpt.dev/v1
2+
kind: Kptfile
3+
metadata:
4+
name: crds
5+
upstream:
6+
type: git
7+
git:
8+
repo: [email protected]:GoogleContainerTools/kpt
9+
directory: /porch/controllers/config/crd/bases
10+
ref: porch/v0.0.9
11+
updateStrategy: resource-merge
12+
upstreamLock:
13+
type: git
14+
git:
15+
repo: [email protected]:GoogleContainerTools/kpt
16+
directory: /porch/controllers/config/crd/bases
17+
ref: porch/v0.0.9
18+
commit: 1c7ebea5b4c9f41321ed28126f8b2b8ff71aba71
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata: # kpt-merge: /remoterootsyncsets.config.porch.kpt.dev
4+
annotations:
5+
controller-gen.kubebuilder.io/version: v0.8.0
6+
internal.kpt.dev/upstream-identifier: 'apiextensions.k8s.io|CustomResourceDefinition|default|remoterootsyncsets.config.porch.kpt.dev'
7+
creationTimestamp: null
8+
name: remoterootsyncsets.config.porch.kpt.dev
9+
spec:
10+
group: config.porch.kpt.dev
11+
names:
12+
kind: RemoteRootSyncSet
13+
listKind: RemoteRootSyncSetList
14+
plural: remoterootsyncsets
15+
singular: remoterootsyncset
16+
scope: Namespaced
17+
versions:
18+
- additionalPrinterColumns:
19+
- jsonPath: .status.aggregated.applied
20+
name: AppliedCount
21+
type: integer
22+
- jsonPath: .status.aggregated.ready
23+
name: ReadyCount
24+
type: integer
25+
- jsonPath: .status.aggregated.total
26+
name: Total
27+
type: integer
28+
- jsonPath: .status.aggregated.conditions[?(@.type=='Applied')].reason
29+
name: Applied
30+
type: string
31+
- jsonPath: .status.aggregated.conditions[?(@.type=='Ready')].reason
32+
name: Ready
33+
type: string
34+
name: v1alpha1
35+
schema:
36+
openAPIV3Schema:
37+
description: "RemoteRootSyncSet represents applying a package to multiple target clusters. In future, this should use ConfigSync, but while we're iterating on OCI/porch support, and making a few similar iterations (e.g. what feedback do we need for rollout), we're just applying directly to the target cluster(s). \n We follow the \"managed remote objects\" pattern; we don't want to create a mirror object, so we start with the \"ReplicaSet\" of Pod/ReplicaSet/Deployment. \n spec.clusterRefs specifies the target clusters \n spec.template maps to the spec of our \"Pod\", in this case a ConfigSync RootSync/RepoSync. Because we're not actually using ConfigSync in this prototype, we are only defining a small subset of fields."
38+
properties:
39+
apiVersion:
40+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
41+
type: string
42+
kind:
43+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
44+
type: string
45+
metadata:
46+
type: object
47+
spec:
48+
description: RemoteRootSyncSetSpec defines the desired state of RemoteRootSync
49+
properties:
50+
clusterRefs:
51+
items:
52+
properties:
53+
apiVersion:
54+
type: string
55+
kind:
56+
type: string
57+
name:
58+
type: string
59+
namespace:
60+
type: string
61+
type: object
62+
type: array
63+
template:
64+
properties:
65+
oci:
66+
description: Git *GitInfo `json:"git,omitempty"`
67+
properties:
68+
repository:
69+
type: string
70+
type: object
71+
sourceFormat:
72+
type: string
73+
type: object
74+
type: object
75+
status:
76+
description: RootSyncSetStatus defines the observed state of RootSyncSet
77+
properties:
78+
aggregated:
79+
properties:
80+
applied:
81+
format: int32
82+
type: integer
83+
conditions:
84+
description: Conditions describes the reconciliation state of the object.
85+
items:
86+
description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
87+
properties:
88+
lastTransitionTime:
89+
description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
90+
format: date-time
91+
type: string
92+
message:
93+
description: message is a human readable message indicating details about the transition. This may be an empty string.
94+
maxLength: 32768
95+
type: string
96+
observedGeneration:
97+
description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
98+
format: int64
99+
minimum: 0
100+
type: integer
101+
reason:
102+
description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
103+
maxLength: 1024
104+
minLength: 1
105+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
106+
type: string
107+
status:
108+
description: status of the condition, one of True, False, Unknown.
109+
enum:
110+
- "True"
111+
- "False"
112+
- Unknown
113+
type: string
114+
type:
115+
description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
116+
maxLength: 316
117+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
118+
type: string
119+
required:
120+
- lastTransitionTime
121+
- message
122+
- reason
123+
- status
124+
- type
125+
type: object
126+
type: array
127+
ready:
128+
format: int32
129+
type: integer
130+
total:
131+
format: int32
132+
type: integer
133+
required:
134+
- applied
135+
- ready
136+
- total
137+
type: object
138+
targets:
139+
items:
140+
properties:
141+
conditions:
142+
description: Conditions describes the reconciliation state of the object.
143+
items:
144+
description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
145+
properties:
146+
lastTransitionTime:
147+
description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
148+
format: date-time
149+
type: string
150+
message:
151+
description: message is a human readable message indicating details about the transition. This may be an empty string.
152+
maxLength: 32768
153+
type: string
154+
observedGeneration:
155+
description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
156+
format: int64
157+
minimum: 0
158+
type: integer
159+
reason:
160+
description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
161+
maxLength: 1024
162+
minLength: 1
163+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
164+
type: string
165+
status:
166+
description: status of the condition, one of True, False, Unknown.
167+
enum:
168+
- "True"
169+
- "False"
170+
- Unknown
171+
type: string
172+
type:
173+
description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
174+
maxLength: 316
175+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
176+
type: string
177+
required:
178+
- lastTransitionTime
179+
- message
180+
- reason
181+
- status
182+
- type
183+
type: object
184+
type: array
185+
ref:
186+
properties:
187+
apiVersion:
188+
type: string
189+
kind:
190+
type: string
191+
name:
192+
type: string
193+
namespace:
194+
type: string
195+
type: object
196+
type: object
197+
type: array
198+
type: object
199+
type: object
200+
served: true
201+
storage: true
202+
subresources:
203+
status: {}
204+
status:
205+
acceptedNames:
206+
kind: ""
207+
plural: ""
208+
conditions: []
209+
storedVersions: []

0 commit comments

Comments
 (0)