Skip to content

Commit 9f05a4a

Browse files
authored
bump workspaces to v0.1.0-alpha8 (#4708)
Signed-off-by: Francesco Ilario <[email protected]>
1 parent 5ae48f9 commit 9f05a4a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1440
-7
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- server/config/default
5+
- operator/config/default
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.14.0
7+
name: internalworkspaces.workspaces.konflux-ci.dev
8+
spec:
9+
group: workspaces.konflux-ci.dev
10+
names:
11+
kind: InternalWorkspace
12+
listKind: InternalWorkspaceList
13+
plural: internalworkspaces
14+
singular: internalworkspace
15+
scope: Namespaced
16+
versions:
17+
- additionalPrinterColumns:
18+
- jsonPath: .spec.visibility
19+
name: Visibility
20+
type: string
21+
name: v1alpha1
22+
schema:
23+
openAPIV3Schema:
24+
description: InternalWorkspace is the Schema for the workspaces API
25+
properties:
26+
apiVersion:
27+
description: |-
28+
APIVersion defines the versioned schema of this representation of an object.
29+
Servers should convert recognized schemas to the latest internal value, and
30+
may reject unrecognized values.
31+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
32+
type: string
33+
kind:
34+
description: |-
35+
Kind is a string value representing the REST resource this object represents.
36+
Servers may infer this from the endpoint the client submits requests to.
37+
Cannot be updated.
38+
In CamelCase.
39+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
40+
type: string
41+
metadata:
42+
type: object
43+
spec:
44+
description: InternalWorkspaceSpec defines the desired state of Workspace
45+
properties:
46+
displayName:
47+
type: string
48+
owner:
49+
description: UserInfo contains information about a user identity
50+
properties:
51+
jwtInfo:
52+
description: JwtInfo contains information extracted from the user
53+
JWT Token
54+
properties:
55+
email:
56+
type: string
57+
sub:
58+
type: string
59+
userId:
60+
type: string
61+
required:
62+
- email
63+
- sub
64+
- userId
65+
type: object
66+
required:
67+
- jwtInfo
68+
type: object
69+
visibility:
70+
enum:
71+
- community
72+
- private
73+
type: string
74+
required:
75+
- displayName
76+
- owner
77+
- visibility
78+
type: object
79+
status:
80+
description: InternalWorkspaceStatus defines the observed state of Workspace
81+
properties:
82+
conditions:
83+
items:
84+
description: "Condition contains details for one aspect of the current
85+
state of this API Resource.\n---\nThis struct is intended for
86+
direct use as an array at the field path .status.conditions. For
87+
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
88+
observations of a foo's current state.\n\t // Known .status.conditions.type
89+
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
90+
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
91+
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
92+
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
93+
\ // other fields\n\t}"
94+
properties:
95+
lastTransitionTime:
96+
description: |-
97+
lastTransitionTime is the last time the condition transitioned from one status to another.
98+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
99+
format: date-time
100+
type: string
101+
message:
102+
description: |-
103+
message is a human readable message indicating details about the transition.
104+
This may be an empty string.
105+
maxLength: 32768
106+
type: string
107+
observedGeneration:
108+
description: |-
109+
observedGeneration represents the .metadata.generation that the condition was set based upon.
110+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
111+
with respect to the current state of the instance.
112+
format: int64
113+
minimum: 0
114+
type: integer
115+
reason:
116+
description: |-
117+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
118+
Producers of specific condition types may define expected values and meanings for this field,
119+
and whether the values are considered a guaranteed API.
120+
The value should be a CamelCase string.
121+
This field may not be empty.
122+
maxLength: 1024
123+
minLength: 1
124+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
125+
type: string
126+
status:
127+
description: status of the condition, one of True, False, Unknown.
128+
enum:
129+
- "True"
130+
- "False"
131+
- Unknown
132+
type: string
133+
type:
134+
description: |-
135+
type of condition in CamelCase or in foo.example.com/CamelCase.
136+
---
137+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
138+
useful (see .node.status.conditions), the ability to deconflict is important.
139+
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
140+
maxLength: 316
141+
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])$
142+
type: string
143+
required:
144+
- lastTransitionTime
145+
- message
146+
- reason
147+
- status
148+
- type
149+
type: object
150+
type: array
151+
owner:
152+
description: Owner contains information on the owner
153+
properties:
154+
username:
155+
type: string
156+
type: object
157+
space:
158+
description: Space contains information about the underlying Space
159+
properties:
160+
isHome:
161+
type: boolean
162+
name:
163+
type: string
164+
targetCluster:
165+
description: TargetCluster contains the URL to the cluster where
166+
the workspace's namespaces live
167+
type: string
168+
required:
169+
- isHome
170+
- name
171+
type: object
172+
type: object
173+
type: object
174+
served: true
175+
storage: true
176+
subresources:
177+
status: {}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- bases/workspaces.konflux-ci.dev_internalworkspaces.yaml
5+
#+kubebuilder:scaffold:crdkustomizeresource
6+
7+
patches: []
8+
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
9+
# patches here are for enabling the conversion webhook for each CRD
10+
#- patches/webhook_in_workspaces.yaml
11+
#+kubebuilder:scaffold:crdkustomizewebhookpatch
12+
13+
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
14+
# patches here are for enabling the CA injection for each CRD
15+
#- patches/cainjection_in_workspaces.yaml
16+
#+kubebuilder:scaffold:crdkustomizecainjectionpatch
17+
18+
# the following config is for teaching kustomize how to do kustomization for CRDs.
19+
configurations:
20+
- kustomizeconfig.yaml
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This file is for teaching kustomize how to substitute name and namespace reference in CRD
2+
nameReference:
3+
- kind: Service
4+
version: v1
5+
fieldSpecs:
6+
- kind: CustomResourceDefinition
7+
version: v1
8+
group: apiextensions.k8s.io
9+
path: spec/conversion/webhook/clientConfig/service/name
10+
11+
namespace:
12+
- kind: CustomResourceDefinition
13+
version: v1
14+
group: apiextensions.k8s.io
15+
path: spec/conversion/webhook/clientConfig/service/namespace
16+
create: false
17+
18+
varReference:
19+
- path: metadata/annotations
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# The following patch adds a directive for certmanager to inject CA into the CRD
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
7+
name: workspaces.workspaces.io
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# The following patch enables a conversion webhook for the CRD
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
name: workspaces.workspaces.io
6+
spec:
7+
conversion:
8+
strategy: Webhook
9+
webhook:
10+
clientConfig:
11+
service:
12+
namespace: system
13+
name: webhook-service
14+
path: /convert
15+
conversionReviewVersions:
16+
- v1
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
namespace: workspaces-system
4+
namePrefix: workspaces-
5+
resources:
6+
- ../crd
7+
- ../rbac
8+
- ../manager
9+
- ../metrics
10+
patches:
11+
- path: manager_auth_proxy_patch.yaml
12+
replacements:
13+
- source:
14+
fieldPath: metadata.name
15+
kind: Secret
16+
name: metrics-reader
17+
targets:
18+
- fieldPaths:
19+
- spec.endpoints.*.authorization.credentials.name
20+
select:
21+
group: monitoring.coreos.com
22+
kind: ServiceMonitor
23+
name: metrics-proxy
24+
- source:
25+
fieldPath: metadata.name
26+
kind: ServiceAccount
27+
name: metrics-reader
28+
targets:
29+
- fieldPaths:
30+
- metadata.annotations.[kubernetes.io/service-account.name]
31+
select:
32+
kind: Secret
33+
name: metrics-reader
34+
options:
35+
create: true
36+
37+
# We need to make the secrets containing the service account tokens before the
38+
# service monitor can start checking for metrics. To ensure this, let's make
39+
# the service account and its secrets before anything else.
40+
sortOptions:
41+
order: legacy
42+
legacySortOptions:
43+
orderFirst:
44+
- Namespace
45+
- ServiceAccount
46+
- Secret
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: controller-manager
5+
namespace: system
6+
spec:
7+
template:
8+
spec:
9+
affinity:
10+
nodeAffinity:
11+
requiredDuringSchedulingIgnoredDuringExecution:
12+
nodeSelectorTerms:
13+
- matchExpressions:
14+
- key: kubernetes.io/arch
15+
operator: In
16+
values:
17+
- amd64
18+
# - arm64
19+
# - ppc64le
20+
# - s390x
21+
- key: kubernetes.io/os
22+
operator: In
23+
values:
24+
- linux
25+
containers:
26+
- name: manager
27+
args:
28+
- "--health-probe-bind-address=:8081"
29+
- "--metrics-bind-address=0.0.0.0:8080"
30+
- "--leader-elect"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- manager.yaml
5+
images:
6+
- name: controller
7+
newName: quay.io/konflux-workspaces/workspaces-operator
8+
newTag: v0.1.0-alpha8
9+
configMapGenerator:
10+
- behavior: replace
11+
literals:
12+
- kubesaw.namespace=toolchain-host-operator
13+
name: operator-config

0 commit comments

Comments
 (0)