(arg, options)
| 476 | }; |
| 477 | |
| 478 | const k8sAddSecret = async function (arg, options) { |
| 479 | let secretName = options.s || DEFAULT_TLS_SECRET_NAME; |
| 480 | let privateKeyPath = options.k; |
| 481 | let certFilePath = options.c; |
| 482 | |
| 483 | if (privateKeyPath == null || certFilePath == null) { |
| 484 | this.errorLog( |
| 485 | `Failed to upload secret. Both a key file path (-k) and a certificate file path (-c) must be provided.`, |
| 486 | ); |
| 487 | } else { |
| 488 | let success = uploadTLSSecret( |
| 489 | secretName, |
| 490 | privateKeyPath, |
| 491 | certFilePath, |
| 492 | this.errorLog, |
| 493 | ); |
| 494 | if (success) { |
| 495 | this.successLog( |
| 496 | `The private key and cert pair were added to your cluster under the secret name "${secretName}".`, |
| 497 | ); |
| 498 | } |
| 499 | } |
| 500 | process.exit(); |
| 501 | }; |
| 502 | |
| 503 | const k8sRemoveSecret = async function (arg, options) { |
| 504 | const secretName = options.s || DEFAULT_TLS_SECRET_NAME; |
nothing calls this directly
no test coverage detected
searching dependent graphs…