Skip to content

Commit 08ffc57

Browse files
committed
Profiles CRD toggle
Introduces a toggle for creating the Profiles CRD. This is to help users overcome #686 Makes a breaking change where "createCRDs" controls whether any CRDs are created. This is on by default. Existing users must take note when upgrading. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent f38cbd2 commit 08ffc57

23 files changed

+2722
-263
lines changed

chart/openfaas/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
description: OpenFaaS - Serverless Functions Made Simple
33
name: openfaas
4-
version: 6.0.4
4+
version: 6.1.0
55
sources:
66
- https://github.com/openfaas/faas
77
- https://github.com/openfaas/faas-netes
+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{{- $functionNs := default .Release.Namespace .Values.functionNamespace }}
2+
{{- if .Values.operator.create }}
3+
{{- if .Values.createCRDs }}
4+
5+
apiVersion: apiextensions.k8s.io/v1beta1
6+
kind: CustomResourceDefinition
7+
metadata:
8+
annotations:
9+
controller-gen.kubebuilder.io/version: v0.3.0
10+
creationTimestamp: null
11+
name: functions.openfaas.com
12+
spec:
13+
group: openfaas.com
14+
names:
15+
kind: Function
16+
listKind: FunctionList
17+
plural: functions
18+
singular: function
19+
scope: Namespaced
20+
validation:
21+
openAPIV3Schema:
22+
description: Function describes an OpenFaaS function
23+
type: object
24+
required:
25+
- spec
26+
properties:
27+
apiVersion:
28+
description: 'APIVersion defines the versioned schema of this representation
29+
of an object. Servers should convert recognized schemas to the latest
30+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
31+
type: string
32+
kind:
33+
description: 'Kind is a string value representing the REST resource this
34+
object represents. Servers may infer this from the endpoint the client
35+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
36+
type: string
37+
metadata:
38+
type: object
39+
spec:
40+
description: FunctionSpec is the spec for a Function resource
41+
type: object
42+
required:
43+
- image
44+
- name
45+
properties:
46+
annotations:
47+
type: object
48+
additionalProperties:
49+
type: string
50+
constraints:
51+
type: array
52+
items:
53+
type: string
54+
environment:
55+
type: object
56+
additionalProperties:
57+
type: string
58+
handler:
59+
type: string
60+
image:
61+
type: string
62+
labels:
63+
type: object
64+
additionalProperties:
65+
type: string
66+
limits:
67+
description: FunctionResources is used to set CPU and memory limits
68+
and requests
69+
type: object
70+
properties:
71+
cpu:
72+
type: string
73+
memory:
74+
type: string
75+
name:
76+
type: string
77+
readOnlyRootFilesystem:
78+
type: boolean
79+
requests:
80+
description: FunctionResources is used to set CPU and memory limits
81+
and requests
82+
type: object
83+
properties:
84+
cpu:
85+
type: string
86+
memory:
87+
type: string
88+
secrets:
89+
type: array
90+
items:
91+
type: string
92+
version: v1
93+
versions:
94+
- name: v1
95+
served: true
96+
storage: true
97+
status:
98+
acceptedNames:
99+
kind: ""
100+
plural: ""
101+
conditions: []
102+
storedVersions: []
103+
104+
105+
---
106+
{{- end }}
107+
{{- end }}

chart/openfaas/templates/ingress-operator-crd.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{{- if .Values.ingressOperator.create }}
2+
{{- if .Values.createCRDs }}
3+
24
apiVersion: apiextensions.k8s.io/v1beta1
35
kind: CustomResourceDefinition
46
metadata:
@@ -83,4 +85,8 @@ spec:
8385
- name: v1alpha2
8486
served: true
8587
storage: true
88+
89+
---
90+
91+
{{- end }}
8692
{{- end }}

chart/openfaas/templates/crd.yaml chart/openfaas/templates/profile-crd.yaml

+3-107
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,4 @@
1-
{{- $functionNs := default .Release.Namespace .Values.functionNamespace }}
2-
{{- if .Values.operator.create }}
3-
{{- if .Values.operator.createCRD }}
4-
5-
apiVersion: apiextensions.k8s.io/v1beta1
6-
kind: CustomResourceDefinition
7-
metadata:
8-
annotations:
9-
controller-gen.kubebuilder.io/version: v0.3.0
10-
creationTimestamp: null
11-
name: functions.openfaas.com
12-
spec:
13-
group: openfaas.com
14-
names:
15-
kind: Function
16-
listKind: FunctionList
17-
plural: functions
18-
singular: function
19-
scope: Namespaced
20-
validation:
21-
openAPIV3Schema:
22-
description: Function describes an OpenFaaS function
23-
type: object
24-
required:
25-
- spec
26-
properties:
27-
apiVersion:
28-
description: 'APIVersion defines the versioned schema of this representation
29-
of an object. Servers should convert recognized schemas to the latest
30-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
31-
type: string
32-
kind:
33-
description: 'Kind is a string value representing the REST resource this
34-
object represents. Servers may infer this from the endpoint the client
35-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
36-
type: string
37-
metadata:
38-
type: object
39-
spec:
40-
description: FunctionSpec is the spec for a Function resource
41-
type: object
42-
required:
43-
- image
44-
- name
45-
properties:
46-
annotations:
47-
type: object
48-
additionalProperties:
49-
type: string
50-
constraints:
51-
type: array
52-
items:
53-
type: string
54-
environment:
55-
type: object
56-
additionalProperties:
57-
type: string
58-
handler:
59-
type: string
60-
image:
61-
type: string
62-
labels:
63-
type: object
64-
additionalProperties:
65-
type: string
66-
limits:
67-
description: FunctionResources is used to set CPU and memory limits
68-
and requests
69-
type: object
70-
properties:
71-
cpu:
72-
type: string
73-
memory:
74-
type: string
75-
name:
76-
type: string
77-
readOnlyRootFilesystem:
78-
type: boolean
79-
requests:
80-
description: FunctionResources is used to set CPU and memory limits
81-
and requests
82-
type: object
83-
properties:
84-
cpu:
85-
type: string
86-
memory:
87-
type: string
88-
secrets:
89-
type: array
90-
items:
91-
type: string
92-
version: v1
93-
versions:
94-
- name: v1
95-
served: true
96-
storage: true
97-
status:
98-
acceptedNames:
99-
kind: ""
100-
plural: ""
101-
conditions: []
102-
storedVersions: []
103-
104-
105-
---
106-
{{- end }}
107-
{{- end }}
1+
{{- if .Values.createCRDs }}
1082

1093
apiVersion: apiextensions.k8s.io/v1beta1
1104
kind: CustomResourceDefinition
@@ -912,4 +806,6 @@ status:
912806
conditions: []
913807
storedVersions: []
914808

809+
---
915810

811+
{{- end }}

chart/openfaas/values-arm64.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
basic_auth: true
22

3+
clusterRole: false
4+
createCRDs: true
5+
36
nodeSelector:
47
beta.kubernetes.io/arch: arm64
58

chart/openfaas/values-armhf.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
basic_auth: false
22

3+
clusterRole: false
4+
createCRDs: true
5+
36
nodeSelector:
47
beta.kubernetes.io/arch: arm
58

chart/openfaas/values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ serviceType: NodePort
77
httpProbe: true # Setting to true will use HTTP for readiness and liveness probe on the OpenFaaS system Pods (incompatible with Istio < 1.1.5)
88
rbac: true
99
clusterRole: false # Set to true to have OpenFaaS administrate multiple namespaces
10+
createCRDs: true
1011

1112
# create pod security policies for OpenFaaS control plane
1213
# https://kubernetes.io/docs/concepts/policy/pod-security-policy/

docs/cron-connector-0.3.1.tgz

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)