We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9baabdc commit 421626bCopy full SHA for 421626b
serverless.js
@@ -0,0 +1,29 @@
1
+const { isEmpty, mergeDeepRight } = require('ramda')
2
+const { Component } = require('@serverless/core')
3
+
4
+const defaults = {
5
+ foo: 'bar'
6
+}
7
8
+class KubernetesNamespace extends Component {
9
+ async default(inputs = {}) {
10
+ const config = mergeDeepRight(defaults, inputs)
11
12
+ this.state = config
13
+ await this.save()
14
+ return this.state
15
+ }
16
17
+ async remove(inputs = {}) {
18
+ let config = mergeDeepRight(defaults, inputs)
19
+ if (isEmpty(config)) {
20
+ config = this.state
21
22
23
+ this.state = {}
24
25
+ return {}
26
27
28
29
+module.exports = KubernetesNamespace
0 commit comments