Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add generated CRDs and update to K8s 1.18
* Regenerates CRDs and adds Policy type * Updates client-go to K8s 1.18 * Updates files for new changes using clientgofix which adds context.TODO() where required. At a later date this needs to be changed to any context we happen to be using in the function. https://github.com/kubernetes-sigs/clientgofix Thanks to @aledbf for changes proposed in #632 Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
- Loading branch information
Showing
38 changed files
with
1,238 additions
and
194 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.3.0 | ||
creationTimestamp: null | ||
name: functions.openfaas.com | ||
spec: | ||
group: openfaas.com | ||
names: | ||
kind: Function | ||
listKind: FunctionList | ||
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: | ||
type: string | ||
memory: | ||
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: | ||
type: string | ||
memory: | ||
type: string | ||
secrets: | ||
type: array | ||
items: | ||
type: string | ||
version: v1 | ||
versions: | ||
- name: v1 | ||
served: true | ||
storage: true | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: [] | ||
storedVersions: [] |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
export controllergen="$GOPATH/bin/controller-gen" | ||
export PKG=sigs.k8s.io/controller-tools/cmd/controller-gen | ||
|
||
if [ ! -e "$gen" ] | ||
then | ||
echo "Getting $PKG" | ||
go get $PKG | ||
fi | ||
|
||
"$controllergen" \ | ||
crd \ | ||
schemapatch:manifests=./artifacts/crds \ | ||
paths=./pkg/apis/... \ | ||
output:dir=./artifacts/crds |
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
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
Oops, something went wrong.