openfaas.yaml 72 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773
  1. ---
  2. # Source: openfaas/templates/controller-rbac.yaml
  3. apiVersion: v1
  4. kind: ServiceAccount
  5. metadata:
  6. labels:
  7. app: openfaas
  8. chart: openfaas-7.0.4
  9. component: faas-controller
  10. heritage: Helm
  11. release: openfaas
  12. name: openfaas-controller
  13. namespace: "openfaas"
  14. ---
  15. # Source: openfaas/templates/prometheus-rbac.yaml
  16. apiVersion: v1
  17. kind: ServiceAccount
  18. metadata:
  19. name: openfaas-prometheus
  20. namespace: "openfaas"
  21. labels:
  22. app: openfaas
  23. chart: openfaas-7.0.4
  24. component: prometheus
  25. heritage: Helm
  26. release: openfaas
  27. ---
  28. # Source: openfaas/templates/alertmanager-cfg.yaml
  29. kind: ConfigMap
  30. apiVersion: v1
  31. metadata:
  32. labels:
  33. app: openfaas
  34. chart: openfaas-7.0.4
  35. component: alertmanager-config
  36. heritage: Helm
  37. release: openfaas
  38. name: alertmanager-config
  39. namespace: "openfaas"
  40. data:
  41. alertmanager.yml: |
  42. route:
  43. group_by: ['alertname', 'cluster', 'service']
  44. group_wait: 5s
  45. group_interval: 10s
  46. repeat_interval: 30s
  47. receiver: scale-up
  48. routes:
  49. - match:
  50. service: gateway
  51. receiver: scale-up
  52. severity: major
  53. inhibit_rules:
  54. - source_match:
  55. severity: 'critical'
  56. target_match:
  57. severity: 'warning'
  58. equal: ['alertname', 'cluster', 'service']
  59. receivers:
  60. - name: 'scale-up'
  61. webhook_configs:
  62. - url: http://gateway.openfaas:8080/system/alert
  63. send_resolved: true
  64. http_config:
  65. basic_auth:
  66. username: admin
  67. password_file: /var/secrets/basic-auth-password
  68. ---
  69. # Source: openfaas/templates/prometheus-cfg.yaml
  70. kind: ConfigMap
  71. apiVersion: v1
  72. metadata:
  73. labels:
  74. app: openfaas
  75. chart: openfaas-7.0.4
  76. component: prometheus-config
  77. heritage: Helm
  78. release: openfaas
  79. name: prometheus-config
  80. namespace: "openfaas"
  81. data:
  82. prometheus.yml: |
  83. global:
  84. scrape_interval: 15s
  85. evaluation_interval: 15s
  86. external_labels:
  87. monitor: 'faas-monitor'
  88. rule_files:
  89. - 'alert.rules.yml'
  90. scrape_configs:
  91. - job_name: 'prometheus'
  92. scrape_interval: 5s
  93. static_configs:
  94. - targets: ['localhost:9090']
  95. - job_name: 'kubernetes-pods'
  96. scrape_interval: 5s
  97. honor_labels: false
  98. kubernetes_sd_configs:
  99. - role: pod
  100. namespaces:
  101. names:
  102. - openfaas
  103. - openfaas-fn
  104. relabel_configs:
  105. - action: labelmap
  106. regex: __meta_kubernetes_pod_label_(.+)
  107. - source_labels: [__meta_kubernetes_namespace]
  108. action: replace
  109. target_label: kubernetes_namespace
  110. - source_labels: [__meta_kubernetes_pod_name]
  111. action: replace
  112. target_label: kubernetes_pod_name
  113. - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
  114. action: keep
  115. regex: true
  116. - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
  117. action: replace
  118. regex: ([^:]+)(?::\d+)?;(\d+)
  119. replacement: $1:$2
  120. target_label: __address__
  121. alerting:
  122. alertmanagers:
  123. - static_configs:
  124. - targets:
  125. - alertmanager:9093
  126. alert.rules.yml: |
  127. groups:
  128. - name: openfaas
  129. rules:
  130. - alert: service_down
  131. expr: up == 0
  132. - alert: APIHighInvocationRate
  133. expr: sum(rate(gateway_function_invocation_total{code="200"}[10s])) BY (function_name) > 5
  134. for: 5s
  135. labels:
  136. service: gateway
  137. severity: major
  138. annotations:
  139. description: High invocation total on "{{$labels.function_name}}"
  140. summary: High invocation total on "{{$labels.function_name}}"
  141. ---
  142. # Source: openfaas/templates/profile-crd.yaml
  143. apiVersion: apiextensions.k8s.io/v1
  144. kind: CustomResourceDefinition
  145. metadata:
  146. annotations:
  147. controller-gen.kubebuilder.io/version: v0.4.0
  148. creationTimestamp: null
  149. name: profiles.openfaas.com
  150. spec:
  151. group: openfaas.com
  152. names:
  153. kind: Profile
  154. listKind: ProfileList
  155. plural: profiles
  156. singular: profile
  157. scope: Namespaced
  158. versions:
  159. - name: v1
  160. schema:
  161. openAPIV3Schema:
  162. description: Profile and ProfileSpec are used to customise the Pod template
  163. for functions
  164. type: object
  165. required:
  166. - spec
  167. properties:
  168. apiVersion:
  169. description: 'APIVersion defines the versioned schema of this representation
  170. of an object. Servers should convert recognized schemas to the latest
  171. internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  172. type: string
  173. kind:
  174. description: 'Kind is a string value representing the REST resource this
  175. object represents. Servers may infer this from the endpoint the client
  176. submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  177. type: string
  178. metadata:
  179. type: object
  180. spec:
  181. description: 'ProfileSpec is an openfaas api extensions that can be predefined
  182. and applied to functions by annotating them with `com.openfaas/profile:
  183. name1,name2`'
  184. type: object
  185. properties:
  186. affinity:
  187. description: "If specified, the pod's scheduling constraints \n copied
  188. to the Pod Affinity, this will replace any existing value or previously
  189. applied Profile. We use a replacement strategy because it is not
  190. clear that merging affinities will actually produce a meaning Affinity
  191. definition, it would likely result in an impossible to satisfy constraint"
  192. type: object
  193. properties:
  194. nodeAffinity:
  195. description: Describes node affinity scheduling rules for the
  196. pod.
  197. type: object
  198. properties:
  199. preferredDuringSchedulingIgnoredDuringExecution:
  200. description: The scheduler will prefer to schedule pods to
  201. nodes that satisfy the affinity expressions specified by
  202. this field, but it may choose a node that violates one or
  203. more of the expressions. The node that is most preferred
  204. is the one with the greatest sum of weights, i.e. for each
  205. node that meets all of the scheduling requirements (resource
  206. request, requiredDuringScheduling affinity expressions,
  207. etc.), compute a sum by iterating through the elements of
  208. this field and adding "weight" to the sum if the node matches
  209. the corresponding matchExpressions; the node(s) with the
  210. highest sum are the most preferred.
  211. type: array
  212. items:
  213. description: An empty preferred scheduling term matches
  214. all objects with implicit weight 0 (i.e. it's a no-op).
  215. A null preferred scheduling term matches no objects (i.e.
  216. is also a no-op).
  217. type: object
  218. required:
  219. - preference
  220. - weight
  221. properties:
  222. preference:
  223. description: A node selector term, associated with the
  224. corresponding weight.
  225. type: object
  226. properties:
  227. matchExpressions:
  228. description: A list of node selector requirements
  229. by node's labels.
  230. type: array
  231. items:
  232. description: A node selector requirement is a
  233. selector that contains values, a key, and an
  234. operator that relates the key and values.
  235. type: object
  236. required:
  237. - key
  238. - operator
  239. properties:
  240. key:
  241. description: The label key that the selector
  242. applies to.
  243. type: string
  244. operator:
  245. description: Represents a key's relationship
  246. to a set of values. Valid operators are
  247. In, NotIn, Exists, DoesNotExist. Gt, and
  248. Lt.
  249. type: string
  250. values:
  251. description: An array of string values. If
  252. the operator is In or NotIn, the values
  253. array must be non-empty. If the operator
  254. is Exists or DoesNotExist, the values array
  255. must be empty. If the operator is Gt or
  256. Lt, the values array must have a single
  257. element, which will be interpreted as an
  258. integer. This array is replaced during a
  259. strategic merge patch.
  260. type: array
  261. items:
  262. type: string
  263. matchFields:
  264. description: A list of node selector requirements
  265. by node's fields.
  266. type: array
  267. items:
  268. description: A node selector requirement is a
  269. selector that contains values, a key, and an
  270. operator that relates the key and values.
  271. type: object
  272. required:
  273. - key
  274. - operator
  275. properties:
  276. key:
  277. description: The label key that the selector
  278. applies to.
  279. type: string
  280. operator:
  281. description: Represents a key's relationship
  282. to a set of values. Valid operators are
  283. In, NotIn, Exists, DoesNotExist. Gt, and
  284. Lt.
  285. type: string
  286. values:
  287. description: An array of string values. If
  288. the operator is In or NotIn, the values
  289. array must be non-empty. If the operator
  290. is Exists or DoesNotExist, the values array
  291. must be empty. If the operator is Gt or
  292. Lt, the values array must have a single
  293. element, which will be interpreted as an
  294. integer. This array is replaced during a
  295. strategic merge patch.
  296. type: array
  297. items:
  298. type: string
  299. weight:
  300. description: Weight associated with matching the corresponding
  301. nodeSelectorTerm, in the range 1-100.
  302. type: integer
  303. format: int32
  304. requiredDuringSchedulingIgnoredDuringExecution:
  305. description: If the affinity requirements specified by this
  306. field are not met at scheduling time, the pod will not be
  307. scheduled onto the node. If the affinity requirements specified
  308. by this field cease to be met at some point during pod execution
  309. (e.g. due to an update), the system may or may not try to
  310. eventually evict the pod from its node.
  311. type: object
  312. required:
  313. - nodeSelectorTerms
  314. properties:
  315. nodeSelectorTerms:
  316. description: Required. A list of node selector terms.
  317. The terms are ORed.
  318. type: array
  319. items:
  320. description: A null or empty node selector term matches
  321. no objects. The requirements of them are ANDed. The
  322. TopologySelectorTerm type implements a subset of the
  323. NodeSelectorTerm.
  324. type: object
  325. properties:
  326. matchExpressions:
  327. description: A list of node selector requirements
  328. by node's labels.
  329. type: array
  330. items:
  331. description: A node selector requirement is a
  332. selector that contains values, a key, and an
  333. operator that relates the key and values.
  334. type: object
  335. required:
  336. - key
  337. - operator
  338. properties:
  339. key:
  340. description: The label key that the selector
  341. applies to.
  342. type: string
  343. operator:
  344. description: Represents a key's relationship
  345. to a set of values. Valid operators are
  346. In, NotIn, Exists, DoesNotExist. Gt, and
  347. Lt.
  348. type: string
  349. values:
  350. description: An array of string values. If
  351. the operator is In or NotIn, the values
  352. array must be non-empty. If the operator
  353. is Exists or DoesNotExist, the values array
  354. must be empty. If the operator is Gt or
  355. Lt, the values array must have a single
  356. element, which will be interpreted as an
  357. integer. This array is replaced during a
  358. strategic merge patch.
  359. type: array
  360. items:
  361. type: string
  362. matchFields:
  363. description: A list of node selector requirements
  364. by node's fields.
  365. type: array
  366. items:
  367. description: A node selector requirement is a
  368. selector that contains values, a key, and an
  369. operator that relates the key and values.
  370. type: object
  371. required:
  372. - key
  373. - operator
  374. properties:
  375. key:
  376. description: The label key that the selector
  377. applies to.
  378. type: string
  379. operator:
  380. description: Represents a key's relationship
  381. to a set of values. Valid operators are
  382. In, NotIn, Exists, DoesNotExist. Gt, and
  383. Lt.
  384. type: string
  385. values:
  386. description: An array of string values. If
  387. the operator is In or NotIn, the values
  388. array must be non-empty. If the operator
  389. is Exists or DoesNotExist, the values array
  390. must be empty. If the operator is Gt or
  391. Lt, the values array must have a single
  392. element, which will be interpreted as an
  393. integer. This array is replaced during a
  394. strategic merge patch.
  395. type: array
  396. items:
  397. type: string
  398. podAffinity:
  399. description: Describes pod affinity scheduling rules (e.g. co-locate
  400. this pod in the same node, zone, etc. as some other pod(s)).
  401. type: object
  402. properties:
  403. preferredDuringSchedulingIgnoredDuringExecution:
  404. description: The scheduler will prefer to schedule pods to
  405. nodes that satisfy the affinity expressions specified by
  406. this field, but it may choose a node that violates one or
  407. more of the expressions. The node that is most preferred
  408. is the one with the greatest sum of weights, i.e. for each
  409. node that meets all of the scheduling requirements (resource
  410. request, requiredDuringScheduling affinity expressions,
  411. etc.), compute a sum by iterating through the elements of
  412. this field and adding "weight" to the sum if the node has
  413. pods which matches the corresponding podAffinityTerm; the
  414. node(s) with the highest sum are the most preferred.
  415. type: array
  416. items:
  417. description: The weights of all of the matched WeightedPodAffinityTerm
  418. fields are added per-node to find the most preferred node(s)
  419. type: object
  420. required:
  421. - podAffinityTerm
  422. - weight
  423. properties:
  424. podAffinityTerm:
  425. description: Required. A pod affinity term, associated
  426. with the corresponding weight.
  427. type: object
  428. required:
  429. - topologyKey
  430. properties:
  431. labelSelector:
  432. description: A label query over a set of resources,
  433. in this case pods.
  434. type: object
  435. properties:
  436. matchExpressions:
  437. description: matchExpressions is a list of label
  438. selector requirements. The requirements are
  439. ANDed.
  440. type: array
  441. items:
  442. description: A label selector requirement
  443. is a selector that contains values, a key,
  444. and an operator that relates the key and
  445. values.
  446. type: object
  447. required:
  448. - key
  449. - operator
  450. properties:
  451. key:
  452. description: key is the label key that
  453. the selector applies to.
  454. type: string
  455. operator:
  456. description: operator represents a key's
  457. relationship to a set of values. Valid
  458. operators are In, NotIn, Exists and
  459. DoesNotExist.
  460. type: string
  461. values:
  462. description: values is an array of string
  463. values. If the operator is In or NotIn,
  464. the values array must be non-empty.
  465. If the operator is Exists or DoesNotExist,
  466. the values array must be empty. This
  467. array is replaced during a strategic
  468. merge patch.
  469. type: array
  470. items:
  471. type: string
  472. matchLabels:
  473. description: matchLabels is a map of {key,value}
  474. pairs. A single {key,value} in the matchLabels
  475. map is equivalent to an element of matchExpressions,
  476. whose key field is "key", the operator is
  477. "In", and the values array contains only "value".
  478. The requirements are ANDed.
  479. type: object
  480. additionalProperties:
  481. type: string
  482. namespaces:
  483. description: namespaces specifies which namespaces
  484. the labelSelector applies to (matches against);
  485. null or empty list means "this pod's namespace"
  486. type: array
  487. items:
  488. type: string
  489. topologyKey:
  490. description: This pod should be co-located (affinity)
  491. or not co-located (anti-affinity) with the pods
  492. matching the labelSelector in the specified namespaces,
  493. where co-located is defined as running on a node
  494. whose value of the label with key topologyKey
  495. matches that of any node on which any of the selected
  496. pods is running. Empty topologyKey is not allowed.
  497. type: string
  498. weight:
  499. description: weight associated with matching the corresponding
  500. podAffinityTerm, in the range 1-100.
  501. type: integer
  502. format: int32
  503. requiredDuringSchedulingIgnoredDuringExecution:
  504. description: If the affinity requirements specified by this
  505. field are not met at scheduling time, the pod will not be
  506. scheduled onto the node. If the affinity requirements specified
  507. by this field cease to be met at some point during pod execution
  508. (e.g. due to a pod label update), the system may or may
  509. not try to eventually evict the pod from its node. When
  510. there are multiple elements, the lists of nodes corresponding
  511. to each podAffinityTerm are intersected, i.e. all terms
  512. must be satisfied.
  513. type: array
  514. items:
  515. description: Defines a set of pods (namely those matching
  516. the labelSelector relative to the given namespace(s))
  517. that this pod should be co-located (affinity) or not co-located
  518. (anti-affinity) with, where co-located is defined as running
  519. on a node whose value of the label with key <topologyKey>
  520. matches that of any node on which a pod of the set of
  521. pods is running
  522. type: object
  523. required:
  524. - topologyKey
  525. properties:
  526. labelSelector:
  527. description: A label query over a set of resources,
  528. in this case pods.
  529. type: object
  530. properties:
  531. matchExpressions:
  532. description: matchExpressions is a list of label
  533. selector requirements. The requirements are ANDed.
  534. type: array
  535. items:
  536. description: A label selector requirement is a
  537. selector that contains values, a key, and an
  538. operator that relates the key and values.
  539. type: object
  540. required:
  541. - key
  542. - operator
  543. properties:
  544. key:
  545. description: key is the label key that the
  546. selector applies to.
  547. type: string
  548. operator:
  549. description: operator represents a key's relationship
  550. to a set of values. Valid operators are
  551. In, NotIn, Exists and DoesNotExist.
  552. type: string
  553. values:
  554. description: values is an array of string
  555. values. If the operator is In or NotIn,
  556. the values array must be non-empty. If the
  557. operator is Exists or DoesNotExist, the
  558. values array must be empty. This array is
  559. replaced during a strategic merge patch.
  560. type: array
  561. items:
  562. type: string
  563. matchLabels:
  564. description: matchLabels is a map of {key,value}
  565. pairs. A single {key,value} in the matchLabels
  566. map is equivalent to an element of matchExpressions,
  567. whose key field is "key", the operator is "In",
  568. and the values array contains only "value". The
  569. requirements are ANDed.
  570. type: object
  571. additionalProperties:
  572. type: string
  573. namespaces:
  574. description: namespaces specifies which namespaces the
  575. labelSelector applies to (matches against); null or
  576. empty list means "this pod's namespace"
  577. type: array
  578. items:
  579. type: string
  580. topologyKey:
  581. description: This pod should be co-located (affinity)
  582. or not co-located (anti-affinity) with the pods matching
  583. the labelSelector in the specified namespaces, where
  584. co-located is defined as running on a node whose value
  585. of the label with key topologyKey matches that of
  586. any node on which any of the selected pods is running.
  587. Empty topologyKey is not allowed.
  588. type: string
  589. podAntiAffinity:
  590. description: Describes pod anti-affinity scheduling rules (e.g.
  591. avoid putting this pod in the same node, zone, etc. as some
  592. other pod(s)).
  593. type: object
  594. properties:
  595. preferredDuringSchedulingIgnoredDuringExecution:
  596. description: The scheduler will prefer to schedule pods to
  597. nodes that satisfy the anti-affinity expressions specified
  598. by this field, but it may choose a node that violates one
  599. or more of the expressions. The node that is most preferred
  600. is the one with the greatest sum of weights, i.e. for each
  601. node that meets all of the scheduling requirements (resource
  602. request, requiredDuringScheduling anti-affinity expressions,
  603. etc.), compute a sum by iterating through the elements of
  604. this field and adding "weight" to the sum if the node has
  605. pods which matches the corresponding podAffinityTerm; the
  606. node(s) with the highest sum are the most preferred.
  607. type: array
  608. items:
  609. description: The weights of all of the matched WeightedPodAffinityTerm
  610. fields are added per-node to find the most preferred node(s)
  611. type: object
  612. required:
  613. - podAffinityTerm
  614. - weight
  615. properties:
  616. podAffinityTerm:
  617. description: Required. A pod affinity term, associated
  618. with the corresponding weight.
  619. type: object
  620. required:
  621. - topologyKey
  622. properties:
  623. labelSelector:
  624. description: A label query over a set of resources,
  625. in this case pods.
  626. type: object
  627. properties:
  628. matchExpressions:
  629. description: matchExpressions is a list of label
  630. selector requirements. The requirements are
  631. ANDed.
  632. type: array
  633. items:
  634. description: A label selector requirement
  635. is a selector that contains values, a key,
  636. and an operator that relates the key and
  637. values.
  638. type: object
  639. required:
  640. - key
  641. - operator
  642. properties:
  643. key:
  644. description: key is the label key that
  645. the selector applies to.
  646. type: string
  647. operator:
  648. description: operator represents a key's
  649. relationship to a set of values. Valid
  650. operators are In, NotIn, Exists and
  651. DoesNotExist.
  652. type: string
  653. values:
  654. description: values is an array of string
  655. values. If the operator is In or NotIn,
  656. the values array must be non-empty.
  657. If the operator is Exists or DoesNotExist,
  658. the values array must be empty. This
  659. array is replaced during a strategic
  660. merge patch.
  661. type: array
  662. items:
  663. type: string
  664. matchLabels:
  665. description: matchLabels is a map of {key,value}
  666. pairs. A single {key,value} in the matchLabels
  667. map is equivalent to an element of matchExpressions,
  668. whose key field is "key", the operator is
  669. "In", and the values array contains only "value".
  670. The requirements are ANDed.
  671. type: object
  672. additionalProperties:
  673. type: string
  674. namespaces:
  675. description: namespaces specifies which namespaces
  676. the labelSelector applies to (matches against);
  677. null or empty list means "this pod's namespace"
  678. type: array
  679. items:
  680. type: string
  681. topologyKey:
  682. description: This pod should be co-located (affinity)
  683. or not co-located (anti-affinity) with the pods
  684. matching the labelSelector in the specified namespaces,
  685. where co-located is defined as running on a node
  686. whose value of the label with key topologyKey
  687. matches that of any node on which any of the selected
  688. pods is running. Empty topologyKey is not allowed.
  689. type: string
  690. weight:
  691. description: weight associated with matching the corresponding
  692. podAffinityTerm, in the range 1-100.
  693. type: integer
  694. format: int32
  695. requiredDuringSchedulingIgnoredDuringExecution:
  696. description: If the anti-affinity requirements specified by
  697. this field are not met at scheduling time, the pod will
  698. not be scheduled onto the node. If the anti-affinity requirements
  699. specified by this field cease to be met at some point during
  700. pod execution (e.g. due to a pod label update), the system
  701. may or may not try to eventually evict the pod from its
  702. node. When there are multiple elements, the lists of nodes
  703. corresponding to each podAffinityTerm are intersected, i.e.
  704. all terms must be satisfied.
  705. type: array
  706. items:
  707. description: Defines a set of pods (namely those matching
  708. the labelSelector relative to the given namespace(s))
  709. that this pod should be co-located (affinity) or not co-located
  710. (anti-affinity) with, where co-located is defined as running
  711. on a node whose value of the label with key <topologyKey>
  712. matches that of any node on which a pod of the set of
  713. pods is running
  714. type: object
  715. required:
  716. - topologyKey
  717. properties:
  718. labelSelector:
  719. description: A label query over a set of resources,
  720. in this case pods.
  721. type: object
  722. properties:
  723. matchExpressions:
  724. description: matchExpressions is a list of label
  725. selector requirements. The requirements are ANDed.
  726. type: array
  727. items:
  728. description: A label selector requirement is a
  729. selector that contains values, a key, and an
  730. operator that relates the key and values.
  731. type: object
  732. required:
  733. - key
  734. - operator
  735. properties:
  736. key:
  737. description: key is the label key that the
  738. selector applies to.
  739. type: string
  740. operator:
  741. description: operator represents a key's relationship
  742. to a set of values. Valid operators are
  743. In, NotIn, Exists and DoesNotExist.
  744. type: string
  745. values:
  746. description: values is an array of string
  747. values. If the operator is In or NotIn,
  748. the values array must be non-empty. If the
  749. operator is Exists or DoesNotExist, the
  750. values array must be empty. This array is
  751. replaced during a strategic merge patch.
  752. type: array
  753. items:
  754. type: string
  755. matchLabels:
  756. description: matchLabels is a map of {key,value}
  757. pairs. A single {key,value} in the matchLabels
  758. map is equivalent to an element of matchExpressions,
  759. whose key field is "key", the operator is "In",
  760. and the values array contains only "value". The
  761. requirements are ANDed.
  762. type: object
  763. additionalProperties:
  764. type: string
  765. namespaces:
  766. description: namespaces specifies which namespaces the
  767. labelSelector applies to (matches against); null or
  768. empty list means "this pod's namespace"
  769. type: array
  770. items:
  771. type: string
  772. topologyKey:
  773. description: This pod should be co-located (affinity)
  774. or not co-located (anti-affinity) with the pods matching
  775. the labelSelector in the specified namespaces, where
  776. co-located is defined as running on a node whose value
  777. of the label with key topologyKey matches that of
  778. any node on which any of the selected pods is running.
  779. Empty topologyKey is not allowed.
  780. type: string
  781. podSecurityContext:
  782. description: "SecurityContext holds pod-level security attributes
  783. and common container settings. Optional: Defaults to empty. See
  784. type description for default values of each field. \n each non-nil
  785. value will be merged into the function's PodSecurityContext, the
  786. value will replace any existing value or previously applied Profile"
  787. type: object
  788. properties:
  789. fsGroup:
  790. description: "A special supplemental group that applies to all
  791. containers in a pod. Some volume types allow the Kubelet to
  792. change the ownership of that volume to be owned by the pod:
  793. \n 1. The owning GID will be the FSGroup 2. The setgid bit is
  794. set (new files created in the volume will be owned by FSGroup)
  795. 3. The permission bits are OR'd with rw-rw---- \n If unset,
  796. the Kubelet will not modify the ownership and permissions of
  797. any volume."
  798. type: integer
  799. format: int64
  800. fsGroupChangePolicy:
  801. description: 'fsGroupChangePolicy defines behavior of changing
  802. ownership and permission of the volume before being exposed
  803. inside Pod. This field will only apply to volume types which
  804. support fsGroup based ownership(and permissions). It will have
  805. no effect on ephemeral volume types such as: secret, configmaps
  806. and emptydir. Valid values are "OnRootMismatch" and "Always".
  807. If not specified defaults to "Always".'
  808. type: string
  809. runAsGroup:
  810. description: The GID to run the entrypoint of the container process.
  811. Uses runtime default if unset. May also be set in SecurityContext. If
  812. set in both SecurityContext and PodSecurityContext, the value
  813. specified in SecurityContext takes precedence for that container.
  814. type: integer
  815. format: int64
  816. runAsNonRoot:
  817. description: Indicates that the container must run as a non-root
  818. user. If true, the Kubelet will validate the image at runtime
  819. to ensure that it does not run as UID 0 (root) and fail to start
  820. the container if it does. If unset or false, no such validation
  821. will be performed. May also be set in SecurityContext. If set
  822. in both SecurityContext and PodSecurityContext, the value specified
  823. in SecurityContext takes precedence.
  824. type: boolean
  825. runAsUser:
  826. description: The UID to run the entrypoint of the container process.
  827. Defaults to user specified in image metadata if unspecified.
  828. May also be set in SecurityContext. If set in both SecurityContext
  829. and PodSecurityContext, the value specified in SecurityContext
  830. takes precedence for that container.
  831. type: integer
  832. format: int64
  833. seLinuxOptions:
  834. description: The SELinux context to be applied to all containers.
  835. If unspecified, the container runtime will allocate a random
  836. SELinux context for each container. May also be set in SecurityContext. If
  837. set in both SecurityContext and PodSecurityContext, the value
  838. specified in SecurityContext takes precedence for that container.
  839. type: object
  840. properties:
  841. level:
  842. description: Level is SELinux level label that applies to
  843. the container.
  844. type: string
  845. role:
  846. description: Role is a SELinux role label that applies to
  847. the container.
  848. type: string
  849. type:
  850. description: Type is a SELinux type label that applies to
  851. the container.
  852. type: string
  853. user:
  854. description: User is a SELinux user label that applies to
  855. the container.
  856. type: string
  857. supplementalGroups:
  858. description: A list of groups applied to the first process run
  859. in each container, in addition to the container's primary GID. If
  860. unspecified, no groups will be added to any container.
  861. type: array
  862. items:
  863. type: integer
  864. format: int64
  865. sysctls:
  866. description: Sysctls hold a list of namespaced sysctls used for
  867. the pod. Pods with unsupported sysctls (by the container runtime)
  868. might fail to launch.
  869. type: array
  870. items:
  871. description: Sysctl defines a kernel parameter to be set
  872. type: object
  873. required:
  874. - name
  875. - value
  876. properties:
  877. name:
  878. description: Name of a property to set
  879. type: string
  880. value:
  881. description: Value of a property to set
  882. type: string
  883. windowsOptions:
  884. description: The Windows specific settings applied to all containers.
  885. If unspecified, the options within a container's SecurityContext
  886. will be used. If set in both SecurityContext and PodSecurityContext,
  887. the value specified in SecurityContext takes precedence.
  888. type: object
  889. properties:
  890. gmsaCredentialSpec:
  891. description: GMSACredentialSpec is where the GMSA admission
  892. webhook (https://github.com/kubernetes-sigs/windows-gmsa)
  893. inlines the contents of the GMSA credential spec named by
  894. the GMSACredentialSpecName field.
  895. type: string
  896. gmsaCredentialSpecName:
  897. description: GMSACredentialSpecName is the name of the GMSA
  898. credential spec to use.
  899. type: string
  900. runAsUserName:
  901. description: The UserName in Windows to run the entrypoint
  902. of the container process. Defaults to the user specified
  903. in image metadata if unspecified. May also be set in PodSecurityContext.
  904. If set in both SecurityContext and PodSecurityContext, the
  905. value specified in SecurityContext takes precedence.
  906. type: string
  907. runtimeClassName:
  908. description: "RuntimeClassName refers to a RuntimeClass object in
  909. the node.k8s.io group, which should be used to run this pod. If
  910. no RuntimeClass resource matches the named class, the pod will not
  911. be run. If unset or empty, the \"legacy\" RuntimeClass will be used,
  912. which is an implicit class with an empty definition that uses the
  913. default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md
  914. This is a beta feature as of Kubernetes v1.14. \n copied to the
  915. Pod RunTimeClass, this will replace any existing value or previously
  916. applied Profile."
  917. type: string
  918. tolerations:
  919. description: "If specified, the function's pod tolerations. \n merged
  920. into the Pod Tolerations"
  921. type: array
  922. items:
  923. description: The pod this Toleration is attached to tolerates any
  924. taint that matches the triple <key,value,effect> using the matching
  925. operator <operator>.
  926. type: object
  927. properties:
  928. effect:
  929. description: Effect indicates the taint effect to match. Empty
  930. means match all taint effects. When specified, allowed values
  931. are NoSchedule, PreferNoSchedule and NoExecute.
  932. type: string
  933. key:
  934. description: Key is the taint key that the toleration applies
  935. to. Empty means match all taint keys. If the key is empty,
  936. operator must be Exists; this combination means to match all
  937. values and all keys.
  938. type: string
  939. operator:
  940. description: Operator represents a key's relationship to the
  941. value. Valid operators are Exists and Equal. Defaults to Equal.
  942. Exists is equivalent to wildcard for value, so that a pod
  943. can tolerate all taints of a particular category.
  944. type: string
  945. tolerationSeconds:
  946. description: TolerationSeconds represents the period of time
  947. the toleration (which must be of effect NoExecute, otherwise
  948. this field is ignored) tolerates the taint. By default, it
  949. is not set, which means tolerate the taint forever (do not
  950. evict). Zero and negative values will be treated as 0 (evict
  951. immediately) by the system.
  952. type: integer
  953. format: int64
  954. value:
  955. description: Value is the taint value the toleration matches
  956. to. If the operator is Exists, the value should be empty,
  957. otherwise just a regular string.
  958. type: string
  959. served: true
  960. storage: true
  961. status:
  962. acceptedNames:
  963. kind: ""
  964. plural: ""
  965. conditions: []
  966. storedVersions: []
  967. ---
  968. # Source: openfaas/templates/controller-rbac.yaml
  969. apiVersion: rbac.authorization.k8s.io/v1
  970. kind: Role
  971. metadata:
  972. labels:
  973. app: openfaas
  974. chart: openfaas-7.0.4
  975. component: faas-controller
  976. heritage: Helm
  977. release: openfaas
  978. name: openfaas-controller
  979. namespace: "openfaas-fn"
  980. rules:
  981. - apiGroups:
  982. - ""
  983. resources:
  984. - services
  985. verbs:
  986. - get
  987. - list
  988. - watch
  989. - create
  990. - delete
  991. - update
  992. - apiGroups:
  993. - extensions
  994. - apps
  995. resources:
  996. - deployments
  997. verbs:
  998. - get
  999. - list
  1000. - watch
  1001. - create
  1002. - delete
  1003. - update
  1004. - apiGroups:
  1005. - ""
  1006. resources:
  1007. - secrets
  1008. verbs:
  1009. - get
  1010. - list
  1011. - watch
  1012. - create
  1013. - update
  1014. - patch
  1015. - delete
  1016. - apiGroups:
  1017. - ""
  1018. resources:
  1019. - pods
  1020. - pods/log
  1021. - namespaces
  1022. - endpoints
  1023. verbs:
  1024. - get
  1025. - list
  1026. - watch
  1027. ---
  1028. # Source: openfaas/templates/controller-rbac.yaml
  1029. apiVersion: rbac.authorization.k8s.io/v1
  1030. kind: Role
  1031. metadata:
  1032. labels:
  1033. app: openfaas
  1034. chart: openfaas-7.0.4
  1035. component: faas-controller
  1036. heritage: Helm
  1037. release: openfaas
  1038. name: openfaas-profiles
  1039. namespace: "openfaas"
  1040. rules:
  1041. - apiGroups:
  1042. - "openfaas.com"
  1043. resources:
  1044. - "profiles"
  1045. verbs:
  1046. - "get"
  1047. - "list"
  1048. - "watch"
  1049. ---
  1050. # Source: openfaas/templates/prometheus-rbac.yaml
  1051. apiVersion: rbac.authorization.k8s.io/v1
  1052. kind: Role
  1053. metadata:
  1054. name: openfaas-prometheus
  1055. labels:
  1056. app: openfaas
  1057. chart: openfaas-7.0.4
  1058. component: prometheus
  1059. heritage: Helm
  1060. release: openfaas
  1061. rules:
  1062. - apiGroups: [""]
  1063. resources:
  1064. - services
  1065. - endpoints
  1066. - pods
  1067. verbs: ["get", "list", "watch"]
  1068. ---
  1069. # Source: openfaas/templates/prometheus-rbac.yaml
  1070. apiVersion: rbac.authorization.k8s.io/v1
  1071. kind: Role
  1072. metadata:
  1073. name: openfaas-prometheus-fn
  1074. namespace: "openfaas-fn"
  1075. labels:
  1076. app: openfaas
  1077. chart: openfaas-7.0.4
  1078. component: prometheus
  1079. heritage: Helm
  1080. release: openfaas
  1081. rules:
  1082. - apiGroups: [""]
  1083. resources:
  1084. - services
  1085. - endpoints
  1086. - pods
  1087. verbs: ["get", "list", "watch"]
  1088. ---
  1089. # Source: openfaas/templates/controller-rbac.yaml
  1090. apiVersion: rbac.authorization.k8s.io/v1
  1091. kind: RoleBinding
  1092. metadata:
  1093. labels:
  1094. app: openfaas
  1095. chart: openfaas-7.0.4
  1096. component: faas-controller
  1097. heritage: Helm
  1098. release: openfaas
  1099. name: openfaas-controller
  1100. namespace: "openfaas-fn"
  1101. roleRef:
  1102. apiGroup: rbac.authorization.k8s.io
  1103. kind: Role
  1104. name: openfaas-controller
  1105. subjects:
  1106. - kind: ServiceAccount
  1107. name: openfaas-controller
  1108. namespace: "openfaas"
  1109. ---
  1110. # Source: openfaas/templates/controller-rbac.yaml
  1111. apiVersion: rbac.authorization.k8s.io/v1
  1112. kind: RoleBinding
  1113. metadata:
  1114. labels:
  1115. app: openfaas
  1116. chart: openfaas-7.0.4
  1117. component: faas-controller
  1118. heritage: Helm
  1119. release: openfaas
  1120. name: openfaas-profiles
  1121. namespace: "openfaas"
  1122. roleRef:
  1123. apiGroup: rbac.authorization.k8s.io
  1124. kind: Role
  1125. name: openfaas-profiles
  1126. subjects:
  1127. - kind: ServiceAccount
  1128. name: openfaas-controller
  1129. namespace: "openfaas"
  1130. ---
  1131. # Source: openfaas/templates/prometheus-rbac.yaml
  1132. apiVersion: rbac.authorization.k8s.io/v1
  1133. kind: RoleBinding
  1134. metadata:
  1135. name: openfaas-prometheus
  1136. namespace: "openfaas"
  1137. labels:
  1138. app: openfaas
  1139. chart: openfaas-7.0.4
  1140. component: prometheus
  1141. heritage: Helm
  1142. release: openfaas
  1143. roleRef:
  1144. apiGroup: rbac.authorization.k8s.io
  1145. kind: Role
  1146. name: openfaas-prometheus
  1147. subjects:
  1148. - kind: ServiceAccount
  1149. name: openfaas-prometheus
  1150. namespace: "openfaas"
  1151. ---
  1152. # Source: openfaas/templates/prometheus-rbac.yaml
  1153. apiVersion: rbac.authorization.k8s.io/v1
  1154. kind: RoleBinding
  1155. metadata:
  1156. name: openfaas-prometheus-fn
  1157. namespace: "openfaas-fn"
  1158. labels:
  1159. app: openfaas
  1160. chart: openfaas-7.0.4
  1161. component: prometheus
  1162. heritage: Helm
  1163. release: openfaas
  1164. roleRef:
  1165. apiGroup: rbac.authorization.k8s.io
  1166. kind: Role
  1167. name: openfaas-prometheus-fn
  1168. subjects:
  1169. - kind: ServiceAccount
  1170. name: openfaas-prometheus
  1171. namespace: "openfaas"
  1172. ---
  1173. # Source: openfaas/templates/alertmanager-svc.yaml
  1174. apiVersion: v1
  1175. kind: Service
  1176. metadata:
  1177. labels:
  1178. app: openfaas
  1179. chart: openfaas-7.0.4
  1180. component: alertmanager
  1181. heritage: Helm
  1182. release: openfaas
  1183. name: alertmanager
  1184. namespace: "openfaas"
  1185. spec:
  1186. type: ClusterIP
  1187. ports:
  1188. - port: 9093
  1189. protocol: TCP
  1190. selector:
  1191. app: alertmanager
  1192. ---
  1193. # Source: openfaas/templates/basic-auth-plugin-svc.yaml
  1194. apiVersion: v1
  1195. kind: Service
  1196. metadata:
  1197. labels:
  1198. app: openfaas
  1199. chart: openfaas-7.0.4
  1200. component: basic-auth-plugin
  1201. heritage: Helm
  1202. release: openfaas
  1203. name: basic-auth-plugin
  1204. namespace: "openfaas"
  1205. spec:
  1206. type: ClusterIP
  1207. ports:
  1208. - port: 8080
  1209. targetPort: http
  1210. protocol: TCP
  1211. name: http
  1212. selector:
  1213. app: basic-auth-plugin
  1214. ---
  1215. # Source: openfaas/templates/gateway-external-svc.yaml
  1216. apiVersion: v1
  1217. kind: Service
  1218. metadata:
  1219. labels:
  1220. app: openfaas
  1221. chart: openfaas-7.0.4
  1222. component: gateway
  1223. heritage: Helm
  1224. release: openfaas
  1225. name: gateway-external
  1226. namespace: "openfaas"
  1227. spec:
  1228. type: NodePort
  1229. ports:
  1230. - name: http
  1231. port: 8080
  1232. protocol: TCP
  1233. targetPort: 8080
  1234. nodePort: 31112
  1235. selector:
  1236. app: gateway
  1237. ---
  1238. # Source: openfaas/templates/gateway-svc.yaml
  1239. apiVersion: v1
  1240. kind: Service
  1241. metadata:
  1242. labels:
  1243. app: openfaas
  1244. chart: openfaas-7.0.4
  1245. component: gateway
  1246. heritage: Helm
  1247. release: openfaas
  1248. name: gateway
  1249. namespace: "openfaas"
  1250. spec:
  1251. type: ClusterIP
  1252. ports:
  1253. - name: http
  1254. port: 8080
  1255. targetPort: http
  1256. protocol: TCP
  1257. selector:
  1258. app: gateway
  1259. ---
  1260. # Source: openfaas/templates/nats-svc.yaml
  1261. apiVersion: v1
  1262. kind: Service
  1263. metadata:
  1264. labels:
  1265. app: openfaas
  1266. chart: openfaas-7.0.4
  1267. component: nats
  1268. heritage: Helm
  1269. release: openfaas
  1270. name: nats
  1271. namespace: "openfaas"
  1272. spec:
  1273. type: ClusterIP
  1274. ports:
  1275. - port: 4222
  1276. protocol: TCP
  1277. name: clients
  1278. selector:
  1279. app: nats
  1280. ---
  1281. # Source: openfaas/templates/prometheus-svc.yaml
  1282. apiVersion: v1
  1283. kind: Service
  1284. metadata:
  1285. labels:
  1286. app: openfaas
  1287. chart: openfaas-7.0.4
  1288. component: prometheus
  1289. heritage: Helm
  1290. release: openfaas
  1291. name: prometheus
  1292. namespace: "openfaas"
  1293. spec:
  1294. type: ClusterIP
  1295. ports:
  1296. - port: 9090
  1297. protocol: TCP
  1298. selector:
  1299. app: prometheus
  1300. ---
  1301. # Source: openfaas/templates/alertmanager-dep.yaml
  1302. apiVersion: apps/v1
  1303. kind: Deployment
  1304. metadata:
  1305. labels:
  1306. app: openfaas
  1307. chart: openfaas-7.0.4
  1308. component: alertmanager
  1309. heritage: Helm
  1310. release: openfaas
  1311. name: alertmanager
  1312. namespace: "openfaas"
  1313. spec:
  1314. replicas: 1
  1315. selector:
  1316. matchLabels:
  1317. app: alertmanager
  1318. template:
  1319. metadata:
  1320. labels:
  1321. app: alertmanager
  1322. annotations:
  1323. sidecar.istio.io/inject: "true"
  1324. checksum/alertmanager-config: "7dae7534ce8e19838cf73d4f4ae97dbf1aee139af11d06443335c2930de12fc5"
  1325. spec:
  1326. containers:
  1327. - name: alertmanager
  1328. image: prom/alertmanager:v0.18.0
  1329. imagePullPolicy: Always
  1330. command:
  1331. - "alertmanager"
  1332. - "--config.file=/alertmanager.yml"
  1333. - "--storage.path=/alertmanager"
  1334. - "--cluster.listen-address="
  1335. livenessProbe:
  1336. httpGet:
  1337. path: /-/ready
  1338. port: 9093
  1339. timeoutSeconds: 30
  1340. readinessProbe:
  1341. httpGet:
  1342. path: /-/ready
  1343. port: 9093
  1344. timeoutSeconds: 30
  1345. ports:
  1346. - containerPort: 9093
  1347. protocol: TCP
  1348. resources:
  1349. limits:
  1350. memory: 50Mi
  1351. requests:
  1352. memory: 25Mi
  1353. volumeMounts:
  1354. - mountPath: /alertmanager.yml
  1355. name: alertmanager-config
  1356. subPath: alertmanager.yml
  1357. - name: auth
  1358. readOnly: true
  1359. mountPath: "/var/secrets"
  1360. volumes:
  1361. - name: alertmanager-config
  1362. configMap:
  1363. name: alertmanager-config
  1364. items:
  1365. - key: alertmanager.yml
  1366. path: alertmanager.yml
  1367. mode: 0644
  1368. - name: auth
  1369. secret:
  1370. secretName: basic-auth
  1371. nodeSelector:
  1372. beta.kubernetes.io/arch: amd64
  1373. ---
  1374. # Source: openfaas/templates/basic-auth-plugin-dep.yaml
  1375. apiVersion: apps/v1
  1376. kind: Deployment
  1377. metadata:
  1378. labels:
  1379. app: openfaas
  1380. chart: openfaas-7.0.4
  1381. component: basic-auth-plugin
  1382. heritage: Helm
  1383. release: openfaas
  1384. name: basic-auth-plugin
  1385. namespace: "openfaas"
  1386. spec:
  1387. replicas: 1
  1388. selector:
  1389. matchLabels:
  1390. app: basic-auth-plugin
  1391. template:
  1392. metadata:
  1393. annotations:
  1394. prometheus.io.scrape: "false"
  1395. labels:
  1396. app: basic-auth-plugin
  1397. spec:
  1398. volumes:
  1399. - name: auth
  1400. secret:
  1401. secretName: basic-auth
  1402. containers:
  1403. - name: basic-auth-plugin
  1404. resources:
  1405. requests:
  1406. cpu: 20m
  1407. memory: 50Mi
  1408. image: openfaas/basic-auth-plugin:0.20.1
  1409. imagePullPolicy: Always
  1410. securityContext:
  1411. readOnlyRootFilesystem: true
  1412. runAsUser: 10001
  1413. livenessProbe:
  1414. httpGet:
  1415. path: /health
  1416. port: 8080
  1417. timeoutSeconds: 5
  1418. readinessProbe:
  1419. httpGet:
  1420. path: /health
  1421. port: 8080
  1422. timeoutSeconds: 5
  1423. env:
  1424. - name: secret_mount_path
  1425. value: "/var/secrets"
  1426. - name: basic_auth
  1427. value: "true"
  1428. volumeMounts:
  1429. - name: auth
  1430. readOnly: true
  1431. mountPath: "/var/secrets"
  1432. ports:
  1433. - name: http
  1434. containerPort: 8080
  1435. protocol: TCP
  1436. nodeSelector:
  1437. beta.kubernetes.io/arch: amd64
  1438. ---
  1439. # Source: openfaas/templates/gateway-dep.yaml
  1440. apiVersion: apps/v1
  1441. kind: Deployment
  1442. metadata:
  1443. labels:
  1444. app: openfaas
  1445. chart: openfaas-7.0.4
  1446. component: gateway
  1447. heritage: Helm
  1448. release: openfaas
  1449. name: gateway
  1450. namespace: "openfaas"
  1451. spec:
  1452. replicas: 1
  1453. selector:
  1454. matchLabels:
  1455. app: gateway
  1456. template:
  1457. metadata:
  1458. annotations:
  1459. prometheus.io.scrape: "true"
  1460. prometheus.io.port: "8082"
  1461. labels:
  1462. app: gateway
  1463. spec:
  1464. serviceAccountName: openfaas-controller
  1465. volumes:
  1466. - name: faas-netes-temp-volume
  1467. emptyDir: {}
  1468. - name: auth
  1469. secret:
  1470. secretName: basic-auth
  1471. containers:
  1472. - name: gateway
  1473. resources:
  1474. requests:
  1475. cpu: 50m
  1476. memory: 120Mi
  1477. image: ghcr.io/openfaas/gateway:0.20.7
  1478. imagePullPolicy: Always
  1479. securityContext:
  1480. readOnlyRootFilesystem: true
  1481. runAsUser: 10001
  1482. livenessProbe:
  1483. httpGet:
  1484. path: /healthz
  1485. port: 8080
  1486. timeoutSeconds: 5
  1487. readinessProbe:
  1488. httpGet:
  1489. path: /healthz
  1490. port: 8080
  1491. timeoutSeconds: 5
  1492. env:
  1493. - name: read_timeout
  1494. value: "65s"
  1495. - name: write_timeout
  1496. value: "65s"
  1497. - name: upstream_timeout
  1498. value: "60s"
  1499. - name: functions_provider_url
  1500. value: "http://127.0.0.1:8081/"
  1501. - name: direct_functions
  1502. value: "false"
  1503. - name: direct_functions_suffix
  1504. value: "openfaas-fn.svc.cluster.local"
  1505. - name: function_namespace
  1506. value: "openfaas-fn"
  1507. - name: faas_nats_address
  1508. value: "nats.openfaas.svc.cluster.local"
  1509. - name: faas_nats_port
  1510. value: "4222"
  1511. - name: faas_nats_channel
  1512. value: "faas-request"
  1513. - name: basic_auth
  1514. value: "true"
  1515. - name: secret_mount_path
  1516. value: "/var/secrets"
  1517. - name: auth_proxy_url
  1518. value: "http://basic-auth-plugin.openfaas:8080/validate"
  1519. - name: auth_pass_body
  1520. value: "false"
  1521. - name: scale_from_zero
  1522. value: "true"
  1523. - name: max_idle_conns
  1524. value: "1024"
  1525. - name: max_idle_conns_per_host
  1526. value: "1024"
  1527. volumeMounts:
  1528. - name: auth
  1529. readOnly: true
  1530. mountPath: "/var/secrets"
  1531. ports:
  1532. - name: http
  1533. containerPort: 8080
  1534. protocol: TCP
  1535. - name: faas-netes
  1536. resources:
  1537. requests:
  1538. cpu: 50m
  1539. memory: 120Mi
  1540. image: ghcr.io/openfaas/faas-netes:0.12.15
  1541. imagePullPolicy: Always
  1542. securityContext:
  1543. readOnlyRootFilesystem: true
  1544. runAsUser: 10001
  1545. env:
  1546. - name: port
  1547. value: "8081"
  1548. - name: function_namespace
  1549. value: "openfaas-fn"
  1550. - name: read_timeout
  1551. value: "60s"
  1552. - name: profiles_namespace
  1553. value: "openfaas"
  1554. - name: write_timeout
  1555. value: "60s"
  1556. - name: image_pull_policy
  1557. value: "Always"
  1558. - name: http_probe
  1559. value: "true"
  1560. - name: set_nonroot_user
  1561. value: "false"
  1562. - name: readiness_probe_initial_delay_seconds
  1563. value: "2"
  1564. - name: readiness_probe_timeout_seconds
  1565. value: "1"
  1566. - name: readiness_probe_period_seconds
  1567. value: "2"
  1568. - name: liveness_probe_initial_delay_seconds
  1569. value: "2"
  1570. - name: liveness_probe_timeout_seconds
  1571. value: "1"
  1572. - name: liveness_probe_period_seconds
  1573. value: "2"
  1574. - name: cluster_role
  1575. value: "false"
  1576. volumeMounts:
  1577. - mountPath: /tmp
  1578. name: faas-netes-temp-volume
  1579. ports:
  1580. - containerPort: 8081
  1581. protocol: TCP
  1582. nodeSelector:
  1583. beta.kubernetes.io/arch: amd64
  1584. ---
  1585. # Source: openfaas/templates/nats-dep.yaml
  1586. apiVersion: apps/v1
  1587. kind: Deployment
  1588. metadata:
  1589. labels:
  1590. app: openfaas
  1591. chart: openfaas-7.0.4
  1592. component: nats
  1593. heritage: Helm
  1594. release: openfaas
  1595. name: nats
  1596. namespace: "openfaas"
  1597. spec:
  1598. replicas: 1
  1599. selector:
  1600. matchLabels:
  1601. app: nats
  1602. template:
  1603. metadata:
  1604. annotations:
  1605. sidecar.istio.io/inject: "false"
  1606. prometheus.io.scrape: "false"
  1607. labels:
  1608. app: nats
  1609. spec:
  1610. containers:
  1611. - name: nats
  1612. resources:
  1613. requests:
  1614. memory: 120Mi
  1615. image: nats-streaming:0.17.0
  1616. imagePullPolicy: Always
  1617. ports:
  1618. - containerPort: 4222
  1619. protocol: TCP
  1620. command: ["/nats-streaming-server"]
  1621. args:
  1622. - --store
  1623. - memory
  1624. - --cluster_id
  1625. - faas-cluster
  1626. nodeSelector:
  1627. beta.kubernetes.io/arch: amd64
  1628. ---
  1629. # Source: openfaas/templates/prometheus-dep.yaml
  1630. apiVersion: apps/v1
  1631. kind: Deployment
  1632. metadata:
  1633. labels:
  1634. app: openfaas
  1635. chart: openfaas-7.0.4
  1636. component: prometheus
  1637. heritage: Helm
  1638. release: openfaas
  1639. name: prometheus
  1640. namespace: "openfaas"
  1641. spec:
  1642. replicas: 1
  1643. selector:
  1644. matchLabels:
  1645. app: prometheus
  1646. template:
  1647. metadata:
  1648. labels:
  1649. app: prometheus
  1650. annotations:
  1651. sidecar.istio.io/inject: "true"
  1652. checksum/prometheus-config: "7c94e196aca8ba463e1b59b7de9fd4868b0d51d387a8b888de1b6709bce7b173"
  1653. spec:
  1654. serviceAccountName: openfaas-prometheus
  1655. containers:
  1656. - name: prometheus
  1657. resources:
  1658. requests:
  1659. memory: 256Mi
  1660. image: prom/prometheus:v2.11.0
  1661. command:
  1662. - "prometheus"
  1663. - "--config.file=/etc/prometheus/prometheus.yml"
  1664. imagePullPolicy: Always
  1665. livenessProbe:
  1666. httpGet:
  1667. path: /-/healthy
  1668. port: 9090
  1669. timeoutSeconds: 30
  1670. readinessProbe:
  1671. httpGet:
  1672. path: /-/healthy
  1673. port: 9090
  1674. timeoutSeconds: 30
  1675. ports:
  1676. - containerPort: 9090
  1677. protocol: TCP
  1678. volumeMounts:
  1679. - mountPath: /etc/prometheus/prometheus.yml
  1680. name: prometheus-config
  1681. subPath: prometheus.yml
  1682. - mountPath: /etc/prometheus/alert.rules.yml
  1683. name: prometheus-config
  1684. subPath: alert.rules.yml
  1685. - mountPath: /prometheus/data
  1686. name: prom-data
  1687. volumes:
  1688. - name: prometheus-config
  1689. configMap:
  1690. name: prometheus-config
  1691. items:
  1692. - key: prometheus.yml
  1693. path: prometheus.yml
  1694. mode: 0644
  1695. - key: alert.rules.yml
  1696. path: alert.rules.yml
  1697. mode: 0644
  1698. - name: prom-data
  1699. emptyDir: {}
  1700. nodeSelector:
  1701. beta.kubernetes.io/arch: amd64
  1702. ---
  1703. # Source: openfaas/templates/queueworker-dep.yaml
  1704. apiVersion: apps/v1
  1705. kind: Deployment
  1706. metadata:
  1707. labels:
  1708. app: openfaas
  1709. chart: openfaas-7.0.4
  1710. component: queue-worker
  1711. heritage: Helm
  1712. release: openfaas
  1713. name: queue-worker
  1714. namespace: "openfaas"
  1715. spec:
  1716. replicas: 1
  1717. selector:
  1718. matchLabels:
  1719. app: queue-worker
  1720. template:
  1721. metadata:
  1722. annotations:
  1723. prometheus.io.scrape: "false"
  1724. labels:
  1725. app: queue-worker
  1726. spec:
  1727. volumes:
  1728. - name: auth
  1729. secret:
  1730. secretName: basic-auth
  1731. containers:
  1732. - name: queue-worker
  1733. resources:
  1734. requests:
  1735. cpu: 50m
  1736. memory: 120Mi
  1737. image: openfaas/queue-worker:0.11.2
  1738. imagePullPolicy: Always
  1739. env:
  1740. - name: faas_nats_address
  1741. value: "nats.openfaas.svc.cluster.local"
  1742. - name: faas_nats_channel
  1743. value: "faas-request"
  1744. - name: faas_nats_queue_group
  1745. value: "faas"
  1746. - name: faas_gateway_address
  1747. value: "gateway.openfaas.svc.cluster.local"
  1748. - name: "gateway_invoke"
  1749. value: "true"
  1750. - name: faas_function_suffix
  1751. value: ".openfaas-fn.svc.cluster.local"
  1752. - name: max_inflight
  1753. value: "1"
  1754. - name: ack_wait # Max duration of any async task / request
  1755. value: 60s
  1756. - name: secret_mount_path
  1757. value: "/var/secrets"
  1758. - name: basic_auth
  1759. value: "true"
  1760. volumeMounts:
  1761. - name: auth
  1762. readOnly: true
  1763. mountPath: "/var/secrets"
  1764. nodeSelector:
  1765. beta.kubernetes.io/arch: amd64