- added retainPods flag to take in the number of specialized pods to retain - add retainPods in both the create function and update function command - modify crd keys to be typed instead of string - keep track of function generation in case of update function operation - add delete handler function to make sure specialized pods are deleted in case function is deleted --------- Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> Signed-off-by: Pranoy Kundu <pranoy1998k@gmail.com> Co-authored-by: Pranoy Kundu <pranoy1998k@gmail.com>
195 lines
5.7 KiB
Go
195 lines
5.7 KiB
Go
/*
|
|
Copyright 2019 The Fission Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
package flagkey
|
|
|
|
const (
|
|
Verbosity = "verbosity"
|
|
Server = "server"
|
|
ClientOnly = "client-only"
|
|
KubeContext = "kube-context"
|
|
|
|
PreCheckOnly = "pre"
|
|
|
|
resourceName = "name"
|
|
force = "force"
|
|
Output = "output"
|
|
|
|
Labels = "labels"
|
|
Annotation = "annotation"
|
|
|
|
IgnoreNotFound = "ignorenotfound"
|
|
|
|
NamespaceFunction = "fnNamespace"
|
|
NamespaceEnvironment = "envNamespace"
|
|
NamespacePackage = "pkgNamespace"
|
|
NamespaceTrigger = "triggerNamespace"
|
|
NamespaceCanary = "canaryNamespace"
|
|
Namespace = "namespace"
|
|
ForceNamespace = "force-namespace"
|
|
AllNamespaces = "all-namespaces"
|
|
NamespacePod = "pod-namespace"
|
|
ForceDelete = "force"
|
|
|
|
RuntimeMincpu = "mincpu"
|
|
RuntimeMaxcpu = "maxcpu"
|
|
RuntimeMinmemory = "minmemory"
|
|
RuntimeMaxmemory = "maxmemory"
|
|
RuntimeTargetcpu = "targetcpu"
|
|
RunImagePullSecret = "imagepullsecret"
|
|
|
|
ReplicasMinscale = "minscale"
|
|
ReplicasMaxscale = "maxscale"
|
|
|
|
FnName = resourceName
|
|
FnSpecializationTimeout = "specializationtimeout"
|
|
FnEnvironmentName = "env"
|
|
FnPackageName = "pkgname"
|
|
FnImageName = "image"
|
|
FnPort = "port"
|
|
FnCommand = "command"
|
|
FnArgs = "args"
|
|
FnEntrypoint = "entrypoint"
|
|
FnBuildCmd = "buildcmd"
|
|
FnSecret = "secret"
|
|
FnForce = force
|
|
FnCfgMap = "configmap"
|
|
FnExecutorType = "executortype"
|
|
FnExecutionTimeout = "fntimeout"
|
|
FnTestTimeout = "timeout"
|
|
FnLogPod = "pod"
|
|
FnLogFollow = "follow"
|
|
FnLogDetail = "detail"
|
|
FnLogDBType = "dbtype"
|
|
FnLogReverseQuery = "reverse"
|
|
FnLogCount = "recordcount"
|
|
FnTestBody = "body"
|
|
FnTestHeader = "header"
|
|
FnTestQuery = "query"
|
|
FnIdleTimeout = "idletimeout"
|
|
FnConcurrency = "concurrency"
|
|
FnRequestsPerPod = "requestsperpod"
|
|
FnOnceOnly = "onceonly"
|
|
FnSubPath = "subpath"
|
|
FnGracePeriod = "graceperiod"
|
|
FnLogAllPods = "all-pods"
|
|
FnRetainPods = "retainpods"
|
|
|
|
HtName = resourceName
|
|
HtMethod = "method"
|
|
HtUrl = "url"
|
|
HtHost = "host"
|
|
HtIngress = "createingress"
|
|
HtIngressRule = "ingressrule"
|
|
HtIngressAnnotation = "ingressannotation"
|
|
HtIngressTLS = "ingresstls"
|
|
HtFnName = "function"
|
|
HtFnWeight = "weight"
|
|
HtFilter = HtFnName
|
|
HtPrefix = "prefix"
|
|
HtKeepPrefix = "keepprefix"
|
|
|
|
TokUsername = "username"
|
|
TokPassword = "password"
|
|
TokAuthURI = "authuri"
|
|
|
|
TtName = resourceName
|
|
TtCron = "cron"
|
|
TtFnName = "function"
|
|
TtRound = "round"
|
|
|
|
MqtName = resourceName
|
|
MqtFnName = "function"
|
|
MqtMQType = "mqtype"
|
|
MqtTopic = "topic"
|
|
MqtRespTopic = "resptopic"
|
|
MqtErrorTopic = "errortopic"
|
|
MqtMaxRetries = "maxretries"
|
|
MqtMsgContentType = "contenttype"
|
|
MqtPollingInterval = "pollinginterval"
|
|
MqtCooldownPeriod = "cooldownperiod"
|
|
MqtMinReplicaCount = "minreplicacount"
|
|
MqtMaxReplicaCount = "maxreplicacount"
|
|
MqtMetadata = "metadata"
|
|
MqtSecret = "secret"
|
|
MqtKind = "mqtkind"
|
|
|
|
EnvName = resourceName
|
|
EnvPoolsize = "poolsize"
|
|
EnvImage = "image"
|
|
EnvBuilderImage = "builder"
|
|
EnvBuildcommand = "buildcmd"
|
|
EnvKeeparchive = "keeparchive"
|
|
EnvExternalNetwork = "externalnetwork"
|
|
EnvGracePeriod = "graceperiod"
|
|
EnvVersion = "version"
|
|
EnvImagePullSecret = "imagepullsecret"
|
|
EnvExecutorType = "executortype"
|
|
EnvForce = force
|
|
EnvBuilder = "builder-env"
|
|
EnvRuntime = "runtime-env"
|
|
|
|
KwName = resourceName
|
|
KwFnName = "function"
|
|
KwNamespace = "namespace"
|
|
KwObjType = "type"
|
|
KwLabels = "labels"
|
|
|
|
PkgName = resourceName
|
|
PkgForce = force
|
|
PkgEnvironment = "env"
|
|
PkgCode = "code"
|
|
PkgSrcArchive = "sourcearchive"
|
|
PkgDeployArchive = "deployarchive"
|
|
PkgSrcChecksum = "srcchecksum"
|
|
PkgDeployChecksum = "deploychecksum"
|
|
PkgInsecure = "insecure"
|
|
PkgBuildCmd = "buildcmd"
|
|
PkgOutput = Output
|
|
PkgStatus = "status"
|
|
PkgOrphan = "orphan"
|
|
|
|
SpecSave = "spec"
|
|
SpecDir = "specdir"
|
|
SpecName = resourceName
|
|
SpecDeployID = "deployid"
|
|
SpecWait = "wait"
|
|
SpecWatch = "watch"
|
|
SpecDelete = "delete"
|
|
SpecDry = "dry"
|
|
SpecValidate = "validation"
|
|
SpecIgnore = "specignore"
|
|
SpecApplyCommitLabel = "commitlabel"
|
|
SpecAllowConflicts = "allowconflicts"
|
|
|
|
SupportOutput = Output
|
|
SupportNoZip = "nozip"
|
|
|
|
CanaryName = resourceName
|
|
CanaryHTTPTriggerName = "httptrigger"
|
|
CanaryNewFunc = "newfunction"
|
|
CanaryOldFunc = "oldfunction"
|
|
CanaryWeightIncrement = "increment-step"
|
|
CanaryIncrementInterval = "increment-interval"
|
|
CanaryFailureThreshold = "failure-threshold"
|
|
|
|
ArchiveName = resourceName
|
|
ArchiveID = "id"
|
|
ArchiveOutput = Output
|
|
|
|
DefaultSpecOutputDir = "fission-dump"
|
|
)
|