Skip to content

Commit

Permalink
Update CRD specs to use apiextensions v1
Browse files Browse the repository at this point in the history
**What**
* Update helm chart RBAC templates to use the `rbac.authorization.k8s.io/v1` group. The beta groups will be removed in k8s 1.20
* Update CRD artifacts using the lastest generator: `./hack/update-crds.sh`
* Update helm chart yaml to use the new CRD specs that live in the `apiextensions.k8s.io/v1` group. The beta groups will be removed in k8s 1.19
* Update Chart readme with a section about service meshes

Test the installation via

```sh
$ kind create cluster
$ helm upgrade openfaas --install chart/openfaas/ \
    --namespace openfaas \
    --set basic_auth=false \
    --set functionNamespace=openfaas-fn
Release "openfaas" does not exist. Installing it now.
NAME: openfaas
LAST DEPLOYED: Sat Nov 14 17:11:59 2020
NAMESPACE: openfaas
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
To verify that openfaas has started, run:

  kubectl -n openfaas get deployments -l "release=openfaas, app=openfaas"
$ kubectl api-versions | grep openfaas
openfaas.com/v1
$ kubectl get crds
NAME                    CREATED AT
profiles.openfaas.com   2020-11-14T16:11:59Z
```

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
  • Loading branch information
LucasRoesler committed Nov 15, 2020
1 parent e88c54c commit 75a12eb
Show file tree
Hide file tree
Showing 13 changed files with 1,716 additions and 1,667 deletions.
143 changes: 71 additions & 72 deletions artifacts/crds/openfaas.com_functions.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
controller-gen.kubebuilder.io/version: v0.4.0
creationTimestamp: null
name: functions.openfaas.com
spec:
Expand All @@ -13,81 +13,80 @@ spec:
plural: functions
singular: function
scope: Namespaced
validation:
openAPIV3Schema:
description: Function describes an OpenFaaS function
type: object
required:
- spec
properties:
apiVersion:
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'
type: string
kind:
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'
type: string
metadata:
type: object
spec:
description: FunctionSpec is the spec for a Function resource
type: object
required:
- image
- name
properties:
annotations:
type: object
additionalProperties:
type: string
constraints:
type: array
items:
type: string
environment:
type: object
additionalProperties:
type: string
handler:
type: string
image:
type: string
labels:
type: object
additionalProperties:
type: string
limits:
description: FunctionResources is used to set CPU and memory limits
and requests
type: object
properties:
cpu:
versions:
- name: v1
schema:
openAPIV3Schema:
description: Function describes an OpenFaaS function
type: object
required:
- spec
properties:
apiVersion:
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'
type: string
kind:
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'
type: string
metadata:
type: object
spec:
description: FunctionSpec is the spec for a Function resource
type: object
required:
- image
- name
properties:
annotations:
type: object
additionalProperties:
type: string
memory:
constraints:
type: array
items:
type: string
name:
type: string
readOnlyRootFilesystem:
type: boolean
requests:
description: FunctionResources is used to set CPU and memory limits
and requests
type: object
properties:
cpu:
environment:
type: object
additionalProperties:
type: string
memory:
handler:
type: string
image:
type: string
labels:
type: object
additionalProperties:
type: string
secrets:
type: array
items:
limits:
description: FunctionResources is used to set CPU and memory limits
and requests
type: object
properties:
cpu:
type: string
memory:
type: string
name:
type: string
version: v1
versions:
- name: v1
readOnlyRootFilesystem:
type: boolean
requests:
description: FunctionResources is used to set CPU and memory limits
and requests
type: object
properties:
cpu:
type: string
memory:
type: string
secrets:
type: array
items:
type: string
served: true
storage: true
status:
Expand Down
Loading

0 comments on commit 75a12eb

Please sign in to comment.