@three14/pulumi-argocd 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +80 -0
- package/accountToken.d.ts +127 -0
- package/accountToken.js +82 -0
- package/accountToken.js.map +1 -0
- package/application.d.ts +267 -0
- package/application.js +226 -0
- package/application.js.map +1 -0
- package/applicationSet.d.ts +528 -0
- package/applicationSet.js +523 -0
- package/applicationSet.js.map +1 -0
- package/cluster.d.ts +258 -0
- package/cluster.js +194 -0
- package/cluster.js.map +1 -0
- package/config/index.d.ts +1 -0
- package/config/index.js +21 -0
- package/config/index.js.map +1 -0
- package/config/vars.d.ts +95 -0
- package/config/vars.js +127 -0
- package/config/vars.js.map +1 -0
- package/index.d.ts +33 -0
- package/index.js +78 -0
- package/index.js.map +1 -0
- package/package.json +28 -0
- package/project.d.ts +198 -0
- package/project.js +193 -0
- package/project.js.map +1 -0
- package/projectToken.d.ts +150 -0
- package/projectToken.js +91 -0
- package/projectToken.js.map +1 -0
- package/provider.d.ts +174 -0
- package/provider.js +66 -0
- package/provider.js.map +1 -0
- package/repository.d.ts +291 -0
- package/repository.js +135 -0
- package/repository.js.map +1 -0
- package/repositoryCertificate.d.ts +84 -0
- package/repositoryCertificate.js +73 -0
- package/repositoryCertificate.js.map +1 -0
- package/repositoryCredentials.d.ts +207 -0
- package/repositoryCredentials.js +113 -0
- package/repositoryCredentials.js.map +1 -0
- package/types/index.d.ts +3 -0
- package/types/index.js +11 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +28046 -0
- package/types/input.js +5 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +28045 -0
- package/types/output.js +5 -0
- package/types/output.js.map +1 -0
- package/utilities.d.ts +8 -0
- package/utilities.js +101 -0
- package/utilities.js.map +1 -0
package/cluster.d.ts
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* Manages [clusters](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#clusters) within ArgoCD.
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as argocd from "@three14/pulumi-argocd";
|
|
12
|
+
* import * as aws from "@pulumi/aws";
|
|
13
|
+
* import * as gcp from "@pulumi/gcp";
|
|
14
|
+
* import * as kubernetes from "@pulumi/kubernetes";
|
|
15
|
+
* import * as std from "@pulumi/std";
|
|
16
|
+
*
|
|
17
|
+
* //# Bearer token Authentication
|
|
18
|
+
* const kubernetes = new argocd.Cluster("kubernetes", {
|
|
19
|
+
* server: "https://1.2.3.4:12345",
|
|
20
|
+
* config: {
|
|
21
|
+
* bearerToken: "eyJhbGciOiJSUzI...",
|
|
22
|
+
* tlsClientConfig: {
|
|
23
|
+
* caData: std.file({
|
|
24
|
+
* input: "path/to/ca.pem",
|
|
25
|
+
* }).then(invoke => invoke.result),
|
|
26
|
+
* },
|
|
27
|
+
* },
|
|
28
|
+
* });
|
|
29
|
+
* //# GCP GKE cluster
|
|
30
|
+
* const cluster = gcp.container.getCluster({
|
|
31
|
+
* name: "cluster",
|
|
32
|
+
* location: "europe-west1",
|
|
33
|
+
* });
|
|
34
|
+
* const argocdManager = new kubernetes.core.v1.ServiceAccount("argocd_manager", {metadata: {
|
|
35
|
+
* name: "argocd-manager",
|
|
36
|
+
* namespace: "kube-system",
|
|
37
|
+
* }});
|
|
38
|
+
* const argocdManagerClusterRole = new kubernetes.rbac.v1.ClusterRole("argocd_manager", {
|
|
39
|
+
* metadata: {
|
|
40
|
+
* name: "argocd-manager-role",
|
|
41
|
+
* },
|
|
42
|
+
* rules: [
|
|
43
|
+
* {
|
|
44
|
+
* apiGroups: ["*"],
|
|
45
|
+
* resources: ["*"],
|
|
46
|
+
* verbs: ["*"],
|
|
47
|
+
* },
|
|
48
|
+
* {
|
|
49
|
+
* nonResourceUrls: ["*"],
|
|
50
|
+
* verbs: ["*"],
|
|
51
|
+
* },
|
|
52
|
+
* ],
|
|
53
|
+
* });
|
|
54
|
+
* const argocdManagerClusterRoleBinding = new kubernetes.rbac.v1.ClusterRoleBinding("argocd_manager", {
|
|
55
|
+
* metadata: {
|
|
56
|
+
* name: "argocd-manager-role-binding",
|
|
57
|
+
* },
|
|
58
|
+
* roleRef: {
|
|
59
|
+
* apiGroup: "rbac.authorization.k8s.io",
|
|
60
|
+
* kind: "ClusterRole",
|
|
61
|
+
* name: argocdManagerClusterRole.metadata.apply(metadata => metadata.name),
|
|
62
|
+
* },
|
|
63
|
+
* subjects: [{
|
|
64
|
+
* kind: "ServiceAccount",
|
|
65
|
+
* name: argocdManager.metadata.apply(metadata => metadata.name),
|
|
66
|
+
* namespace: argocdManager.metadata.apply(metadata => metadata.namespace),
|
|
67
|
+
* }],
|
|
68
|
+
* });
|
|
69
|
+
* const argocdManagerSecret = new kubernetes.core.v1.Secret("argocd_manager", {metadata: {
|
|
70
|
+
* name: argocdManager.defaultSecretName,
|
|
71
|
+
* namespace: argocdManager.metadata.apply(metadata => metadata.namespace),
|
|
72
|
+
* }});
|
|
73
|
+
* const gke = new argocd.Cluster("gke", {
|
|
74
|
+
* server: cluster.then(cluster => std.join({
|
|
75
|
+
* separator: "",
|
|
76
|
+
* input: [
|
|
77
|
+
* "https://%s",
|
|
78
|
+
* cluster.endpoint,
|
|
79
|
+
* ],
|
|
80
|
+
* })).then(invoke => invoke.result),
|
|
81
|
+
* name: "gke",
|
|
82
|
+
* config: {
|
|
83
|
+
* bearerToken: argocdManagerKubernetesSecret.data.token,
|
|
84
|
+
* tlsClientConfig: {
|
|
85
|
+
* caData: cluster.then(cluster => std.base64decode({
|
|
86
|
+
* input: cluster.masterAuths?.[0]?.clusterCaCertificate,
|
|
87
|
+
* })).then(invoke => invoke.result),
|
|
88
|
+
* },
|
|
89
|
+
* },
|
|
90
|
+
* });
|
|
91
|
+
* //# AWS EKS cluster
|
|
92
|
+
* const clusterGetCluster = aws.eks.getCluster({
|
|
93
|
+
* name: "cluster",
|
|
94
|
+
* });
|
|
95
|
+
* const eks = new argocd.Cluster("eks", {
|
|
96
|
+
* server: clusterGetCluster.then(clusterGetCluster => std.join({
|
|
97
|
+
* separator: "",
|
|
98
|
+
* input: [
|
|
99
|
+
* "https://%s",
|
|
100
|
+
* clusterGetCluster.endpoint,
|
|
101
|
+
* ],
|
|
102
|
+
* })).then(invoke => invoke.result),
|
|
103
|
+
* name: "eks",
|
|
104
|
+
* namespaces: [
|
|
105
|
+
* "default",
|
|
106
|
+
* "optional",
|
|
107
|
+
* ],
|
|
108
|
+
* config: {
|
|
109
|
+
* awsAuthConfigs: [{
|
|
110
|
+
* clusterName: "myekscluster",
|
|
111
|
+
* roleArn: "arn:aws:iam::<123456789012>:role/<role-name>",
|
|
112
|
+
* }],
|
|
113
|
+
* tlsClientConfig: {
|
|
114
|
+
* caData: clusterGetCluster.then(clusterGetCluster => std.base64decode({
|
|
115
|
+
* input: clusterGetCluster.certificateAuthorities?.[0]?.data,
|
|
116
|
+
* })).then(invoke => invoke.result),
|
|
117
|
+
* },
|
|
118
|
+
* },
|
|
119
|
+
* });
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* ## Import
|
|
123
|
+
*
|
|
124
|
+
* Cluster credentials can be imported using the server URL.
|
|
125
|
+
*
|
|
126
|
+
* Example:
|
|
127
|
+
*
|
|
128
|
+
* ```sh
|
|
129
|
+
* $ pulumi import argocd:index/cluster:Cluster mycluster https://mycluster.io:443
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
export declare class Cluster extends pulumi.CustomResource {
|
|
133
|
+
/**
|
|
134
|
+
* Get an existing Cluster resource's state with the given name, ID, and optional extra
|
|
135
|
+
* properties used to qualify the lookup.
|
|
136
|
+
*
|
|
137
|
+
* @param name The _unique_ name of the resulting resource.
|
|
138
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
139
|
+
* @param state Any extra arguments used during the lookup.
|
|
140
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
141
|
+
*/
|
|
142
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ClusterState, opts?: pulumi.CustomResourceOptions): Cluster;
|
|
143
|
+
/**
|
|
144
|
+
* Returns true if the given object is an instance of Cluster. This is designed to work even
|
|
145
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
146
|
+
*/
|
|
147
|
+
static isInstance(obj: any): obj is Cluster;
|
|
148
|
+
/**
|
|
149
|
+
* Cluster information for connecting to a cluster.
|
|
150
|
+
*/
|
|
151
|
+
readonly config: pulumi.Output<outputs.ClusterConfig>;
|
|
152
|
+
/**
|
|
153
|
+
* Information about cluster cache and state.
|
|
154
|
+
*/
|
|
155
|
+
readonly infos: pulumi.Output<outputs.ClusterInfo[]>;
|
|
156
|
+
/**
|
|
157
|
+
* Standard cluster secret's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
158
|
+
*/
|
|
159
|
+
readonly metadatas: pulumi.Output<outputs.ClusterMetadata[] | undefined>;
|
|
160
|
+
/**
|
|
161
|
+
* Name of the cluster. If omitted, will use the server address.
|
|
162
|
+
*/
|
|
163
|
+
readonly name: pulumi.Output<string>;
|
|
164
|
+
/**
|
|
165
|
+
* List of namespaces which are accessible in that cluster. Cluster level resources would be ignored if namespace list is not empty.
|
|
166
|
+
*/
|
|
167
|
+
readonly namespaces: pulumi.Output<string[] | undefined>;
|
|
168
|
+
/**
|
|
169
|
+
* Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/projects/#project-scoped-repositories-and-clusters.
|
|
170
|
+
*/
|
|
171
|
+
readonly project: pulumi.Output<string | undefined>;
|
|
172
|
+
/**
|
|
173
|
+
* Server is the API server URL of the Kubernetes cluster.
|
|
174
|
+
*/
|
|
175
|
+
readonly server: pulumi.Output<string | undefined>;
|
|
176
|
+
/**
|
|
177
|
+
* Optional shard number. Calculated on the fly by the application controller if not specified.
|
|
178
|
+
*/
|
|
179
|
+
readonly shard: pulumi.Output<string | undefined>;
|
|
180
|
+
/**
|
|
181
|
+
* Create a Cluster resource with the given unique name, arguments, and options.
|
|
182
|
+
*
|
|
183
|
+
* @param name The _unique_ name of the resource.
|
|
184
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
185
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
186
|
+
*/
|
|
187
|
+
constructor(name: string, args: ClusterArgs, opts?: pulumi.CustomResourceOptions);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Input properties used for looking up and filtering Cluster resources.
|
|
191
|
+
*/
|
|
192
|
+
export interface ClusterState {
|
|
193
|
+
/**
|
|
194
|
+
* Cluster information for connecting to a cluster.
|
|
195
|
+
*/
|
|
196
|
+
config?: pulumi.Input<inputs.ClusterConfig>;
|
|
197
|
+
/**
|
|
198
|
+
* Information about cluster cache and state.
|
|
199
|
+
*/
|
|
200
|
+
infos?: pulumi.Input<pulumi.Input<inputs.ClusterInfo>[]>;
|
|
201
|
+
/**
|
|
202
|
+
* Standard cluster secret's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
203
|
+
*/
|
|
204
|
+
metadatas?: pulumi.Input<pulumi.Input<inputs.ClusterMetadata>[]>;
|
|
205
|
+
/**
|
|
206
|
+
* Name of the cluster. If omitted, will use the server address.
|
|
207
|
+
*/
|
|
208
|
+
name?: pulumi.Input<string>;
|
|
209
|
+
/**
|
|
210
|
+
* List of namespaces which are accessible in that cluster. Cluster level resources would be ignored if namespace list is not empty.
|
|
211
|
+
*/
|
|
212
|
+
namespaces?: pulumi.Input<pulumi.Input<string>[]>;
|
|
213
|
+
/**
|
|
214
|
+
* Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/projects/#project-scoped-repositories-and-clusters.
|
|
215
|
+
*/
|
|
216
|
+
project?: pulumi.Input<string>;
|
|
217
|
+
/**
|
|
218
|
+
* Server is the API server URL of the Kubernetes cluster.
|
|
219
|
+
*/
|
|
220
|
+
server?: pulumi.Input<string>;
|
|
221
|
+
/**
|
|
222
|
+
* Optional shard number. Calculated on the fly by the application controller if not specified.
|
|
223
|
+
*/
|
|
224
|
+
shard?: pulumi.Input<string>;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* The set of arguments for constructing a Cluster resource.
|
|
228
|
+
*/
|
|
229
|
+
export interface ClusterArgs {
|
|
230
|
+
/**
|
|
231
|
+
* Cluster information for connecting to a cluster.
|
|
232
|
+
*/
|
|
233
|
+
config: pulumi.Input<inputs.ClusterConfig>;
|
|
234
|
+
/**
|
|
235
|
+
* Standard cluster secret's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
236
|
+
*/
|
|
237
|
+
metadatas?: pulumi.Input<pulumi.Input<inputs.ClusterMetadata>[]>;
|
|
238
|
+
/**
|
|
239
|
+
* Name of the cluster. If omitted, will use the server address.
|
|
240
|
+
*/
|
|
241
|
+
name?: pulumi.Input<string>;
|
|
242
|
+
/**
|
|
243
|
+
* List of namespaces which are accessible in that cluster. Cluster level resources would be ignored if namespace list is not empty.
|
|
244
|
+
*/
|
|
245
|
+
namespaces?: pulumi.Input<pulumi.Input<string>[]>;
|
|
246
|
+
/**
|
|
247
|
+
* Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity. More info: https://argo-cd.readthedocs.io/en/stable/user-guide/projects/#project-scoped-repositories-and-clusters.
|
|
248
|
+
*/
|
|
249
|
+
project?: pulumi.Input<string>;
|
|
250
|
+
/**
|
|
251
|
+
* Server is the API server URL of the Kubernetes cluster.
|
|
252
|
+
*/
|
|
253
|
+
server?: pulumi.Input<string>;
|
|
254
|
+
/**
|
|
255
|
+
* Optional shard number. Calculated on the fly by the application controller if not specified.
|
|
256
|
+
*/
|
|
257
|
+
shard?: pulumi.Input<string>;
|
|
258
|
+
}
|
package/cluster.js
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Cluster = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Manages [clusters](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#clusters) within ArgoCD.
|
|
10
|
+
*
|
|
11
|
+
* ## Example Usage
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
+
* import * as argocd from "@three14/pulumi-argocd";
|
|
16
|
+
* import * as aws from "@pulumi/aws";
|
|
17
|
+
* import * as gcp from "@pulumi/gcp";
|
|
18
|
+
* import * as kubernetes from "@pulumi/kubernetes";
|
|
19
|
+
* import * as std from "@pulumi/std";
|
|
20
|
+
*
|
|
21
|
+
* //# Bearer token Authentication
|
|
22
|
+
* const kubernetes = new argocd.Cluster("kubernetes", {
|
|
23
|
+
* server: "https://1.2.3.4:12345",
|
|
24
|
+
* config: {
|
|
25
|
+
* bearerToken: "eyJhbGciOiJSUzI...",
|
|
26
|
+
* tlsClientConfig: {
|
|
27
|
+
* caData: std.file({
|
|
28
|
+
* input: "path/to/ca.pem",
|
|
29
|
+
* }).then(invoke => invoke.result),
|
|
30
|
+
* },
|
|
31
|
+
* },
|
|
32
|
+
* });
|
|
33
|
+
* //# GCP GKE cluster
|
|
34
|
+
* const cluster = gcp.container.getCluster({
|
|
35
|
+
* name: "cluster",
|
|
36
|
+
* location: "europe-west1",
|
|
37
|
+
* });
|
|
38
|
+
* const argocdManager = new kubernetes.core.v1.ServiceAccount("argocd_manager", {metadata: {
|
|
39
|
+
* name: "argocd-manager",
|
|
40
|
+
* namespace: "kube-system",
|
|
41
|
+
* }});
|
|
42
|
+
* const argocdManagerClusterRole = new kubernetes.rbac.v1.ClusterRole("argocd_manager", {
|
|
43
|
+
* metadata: {
|
|
44
|
+
* name: "argocd-manager-role",
|
|
45
|
+
* },
|
|
46
|
+
* rules: [
|
|
47
|
+
* {
|
|
48
|
+
* apiGroups: ["*"],
|
|
49
|
+
* resources: ["*"],
|
|
50
|
+
* verbs: ["*"],
|
|
51
|
+
* },
|
|
52
|
+
* {
|
|
53
|
+
* nonResourceUrls: ["*"],
|
|
54
|
+
* verbs: ["*"],
|
|
55
|
+
* },
|
|
56
|
+
* ],
|
|
57
|
+
* });
|
|
58
|
+
* const argocdManagerClusterRoleBinding = new kubernetes.rbac.v1.ClusterRoleBinding("argocd_manager", {
|
|
59
|
+
* metadata: {
|
|
60
|
+
* name: "argocd-manager-role-binding",
|
|
61
|
+
* },
|
|
62
|
+
* roleRef: {
|
|
63
|
+
* apiGroup: "rbac.authorization.k8s.io",
|
|
64
|
+
* kind: "ClusterRole",
|
|
65
|
+
* name: argocdManagerClusterRole.metadata.apply(metadata => metadata.name),
|
|
66
|
+
* },
|
|
67
|
+
* subjects: [{
|
|
68
|
+
* kind: "ServiceAccount",
|
|
69
|
+
* name: argocdManager.metadata.apply(metadata => metadata.name),
|
|
70
|
+
* namespace: argocdManager.metadata.apply(metadata => metadata.namespace),
|
|
71
|
+
* }],
|
|
72
|
+
* });
|
|
73
|
+
* const argocdManagerSecret = new kubernetes.core.v1.Secret("argocd_manager", {metadata: {
|
|
74
|
+
* name: argocdManager.defaultSecretName,
|
|
75
|
+
* namespace: argocdManager.metadata.apply(metadata => metadata.namespace),
|
|
76
|
+
* }});
|
|
77
|
+
* const gke = new argocd.Cluster("gke", {
|
|
78
|
+
* server: cluster.then(cluster => std.join({
|
|
79
|
+
* separator: "",
|
|
80
|
+
* input: [
|
|
81
|
+
* "https://%s",
|
|
82
|
+
* cluster.endpoint,
|
|
83
|
+
* ],
|
|
84
|
+
* })).then(invoke => invoke.result),
|
|
85
|
+
* name: "gke",
|
|
86
|
+
* config: {
|
|
87
|
+
* bearerToken: argocdManagerKubernetesSecret.data.token,
|
|
88
|
+
* tlsClientConfig: {
|
|
89
|
+
* caData: cluster.then(cluster => std.base64decode({
|
|
90
|
+
* input: cluster.masterAuths?.[0]?.clusterCaCertificate,
|
|
91
|
+
* })).then(invoke => invoke.result),
|
|
92
|
+
* },
|
|
93
|
+
* },
|
|
94
|
+
* });
|
|
95
|
+
* //# AWS EKS cluster
|
|
96
|
+
* const clusterGetCluster = aws.eks.getCluster({
|
|
97
|
+
* name: "cluster",
|
|
98
|
+
* });
|
|
99
|
+
* const eks = new argocd.Cluster("eks", {
|
|
100
|
+
* server: clusterGetCluster.then(clusterGetCluster => std.join({
|
|
101
|
+
* separator: "",
|
|
102
|
+
* input: [
|
|
103
|
+
* "https://%s",
|
|
104
|
+
* clusterGetCluster.endpoint,
|
|
105
|
+
* ],
|
|
106
|
+
* })).then(invoke => invoke.result),
|
|
107
|
+
* name: "eks",
|
|
108
|
+
* namespaces: [
|
|
109
|
+
* "default",
|
|
110
|
+
* "optional",
|
|
111
|
+
* ],
|
|
112
|
+
* config: {
|
|
113
|
+
* awsAuthConfigs: [{
|
|
114
|
+
* clusterName: "myekscluster",
|
|
115
|
+
* roleArn: "arn:aws:iam::<123456789012>:role/<role-name>",
|
|
116
|
+
* }],
|
|
117
|
+
* tlsClientConfig: {
|
|
118
|
+
* caData: clusterGetCluster.then(clusterGetCluster => std.base64decode({
|
|
119
|
+
* input: clusterGetCluster.certificateAuthorities?.[0]?.data,
|
|
120
|
+
* })).then(invoke => invoke.result),
|
|
121
|
+
* },
|
|
122
|
+
* },
|
|
123
|
+
* });
|
|
124
|
+
* ```
|
|
125
|
+
*
|
|
126
|
+
* ## Import
|
|
127
|
+
*
|
|
128
|
+
* Cluster credentials can be imported using the server URL.
|
|
129
|
+
*
|
|
130
|
+
* Example:
|
|
131
|
+
*
|
|
132
|
+
* ```sh
|
|
133
|
+
* $ pulumi import argocd:index/cluster:Cluster mycluster https://mycluster.io:443
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
class Cluster extends pulumi.CustomResource {
|
|
137
|
+
/**
|
|
138
|
+
* Get an existing Cluster resource's state with the given name, ID, and optional extra
|
|
139
|
+
* properties used to qualify the lookup.
|
|
140
|
+
*
|
|
141
|
+
* @param name The _unique_ name of the resulting resource.
|
|
142
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
143
|
+
* @param state Any extra arguments used during the lookup.
|
|
144
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
145
|
+
*/
|
|
146
|
+
static get(name, id, state, opts) {
|
|
147
|
+
return new Cluster(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Returns true if the given object is an instance of Cluster. This is designed to work even
|
|
151
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
152
|
+
*/
|
|
153
|
+
static isInstance(obj) {
|
|
154
|
+
if (obj === undefined || obj === null) {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
return obj['__pulumiType'] === Cluster.__pulumiType;
|
|
158
|
+
}
|
|
159
|
+
constructor(name, argsOrState, opts) {
|
|
160
|
+
let resourceInputs = {};
|
|
161
|
+
opts = opts || {};
|
|
162
|
+
if (opts.id) {
|
|
163
|
+
const state = argsOrState;
|
|
164
|
+
resourceInputs["config"] = state ? state.config : undefined;
|
|
165
|
+
resourceInputs["infos"] = state ? state.infos : undefined;
|
|
166
|
+
resourceInputs["metadatas"] = state ? state.metadatas : undefined;
|
|
167
|
+
resourceInputs["name"] = state ? state.name : undefined;
|
|
168
|
+
resourceInputs["namespaces"] = state ? state.namespaces : undefined;
|
|
169
|
+
resourceInputs["project"] = state ? state.project : undefined;
|
|
170
|
+
resourceInputs["server"] = state ? state.server : undefined;
|
|
171
|
+
resourceInputs["shard"] = state ? state.shard : undefined;
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
const args = argsOrState;
|
|
175
|
+
if ((!args || args.config === undefined) && !opts.urn) {
|
|
176
|
+
throw new Error("Missing required property 'config'");
|
|
177
|
+
}
|
|
178
|
+
resourceInputs["config"] = args ? args.config : undefined;
|
|
179
|
+
resourceInputs["metadatas"] = args ? args.metadatas : undefined;
|
|
180
|
+
resourceInputs["name"] = args ? args.name : undefined;
|
|
181
|
+
resourceInputs["namespaces"] = args ? args.namespaces : undefined;
|
|
182
|
+
resourceInputs["project"] = args ? args.project : undefined;
|
|
183
|
+
resourceInputs["server"] = args ? args.server : undefined;
|
|
184
|
+
resourceInputs["shard"] = args ? args.shard : undefined;
|
|
185
|
+
resourceInputs["infos"] = undefined /*out*/;
|
|
186
|
+
}
|
|
187
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
188
|
+
super(Cluster.__pulumiType, name, resourceInputs, opts);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
exports.Cluster = Cluster;
|
|
192
|
+
/** @internal */
|
|
193
|
+
Cluster.__pulumiType = 'argocd:index/cluster:Cluster';
|
|
194
|
+
//# sourceMappingURL=cluster.js.map
|
package/cluster.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cluster.js","sourceRoot":"","sources":["../cluster.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAC/C;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC5D,CAAC;;AAlGL,0BAmGC;AArFG,gBAAgB;AACO,oBAAY,GAAG,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./vars";
|
package/config/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
// Export members:
|
|
20
|
+
__exportStar(require("./vars"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;;;;;;;;;;;;;;AAEjF,kBAAkB;AAClB,yCAAuB"}
|
package/config/vars.d.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as outputs from "../types/output";
|
|
2
|
+
/**
|
|
3
|
+
* ArgoCD authentication token, takes precedence over `username`/`password`. Can be set through the `ARGOCD_AUTH_TOKEN`
|
|
4
|
+
* environment variable.
|
|
5
|
+
*/
|
|
6
|
+
export declare const authToken: string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Additional root CA certificates file to add to the client TLS connection pool.
|
|
9
|
+
*/
|
|
10
|
+
export declare const certFile: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Client certificate.
|
|
13
|
+
*/
|
|
14
|
+
export declare const clientCertFile: string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Client certificate key.
|
|
17
|
+
*/
|
|
18
|
+
export declare const clientCertKey: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Override the default config path of `$HOME/.config/argocd/config`. Only relevant when `useLocalConfig`. Can be set
|
|
21
|
+
* through the `ARGOCD_CONFIG_PATH` environment variable.
|
|
22
|
+
*/
|
|
23
|
+
export declare const configPath: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Context to choose when using a local ArgoCD config file. Only relevant when `useLocalConfig`. Can be set through
|
|
26
|
+
* `ARGOCD_CONTEXT` environment variable.
|
|
27
|
+
*/
|
|
28
|
+
export declare const context: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Configure direct access using Kubernetes API server. **Warning**: this feature works by starting a local ArgoCD API
|
|
31
|
+
* server that talks directly to the Kubernetes API using the **current context in the default kubeconfig**
|
|
32
|
+
* (`~/.kube/config`). This behavior cannot be overridden using either environment variables or the `kubernetes` block in
|
|
33
|
+
* the provider configuration at present). If the server fails to start (e.g. your kubeconfig is misconfigured) then the
|
|
34
|
+
* provider will fail as a result of the `argocd` module forcing it to exit and no logs will be available to help you debug
|
|
35
|
+
* this. The error message will be similar to > `The plugin encountered an error, and failed to respond to the
|
|
36
|
+
* plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.` To debug this, you will need to
|
|
37
|
+
* login via the ArgoCD CLI using `argocd login --core` and then running an operation. E.g. `argocd app list`.
|
|
38
|
+
*/
|
|
39
|
+
export declare const core: boolean | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Whether to use gRPC web proxy client. Useful if Argo CD server is behind proxy which does not support HTTP2.
|
|
42
|
+
*/
|
|
43
|
+
export declare const grpcWeb: boolean | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Use the gRPC web proxy client and set the web root, e.g. `argo-cd`. Useful if the Argo CD server is behind a proxy at a
|
|
46
|
+
* non-root path.
|
|
47
|
+
*/
|
|
48
|
+
export declare const grpcWebRootPath: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Additional headers to add to each request to the ArgoCD server.
|
|
51
|
+
*/
|
|
52
|
+
export declare const headers: string[] | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Whether to skip TLS server certificate. Can be set through the `ARGOCD_INSECURE` environment variable.
|
|
55
|
+
*/
|
|
56
|
+
export declare const insecure: boolean | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Kubernetes configuration overrides. Only relevant when `portForward = true` or `portForwardWithNamespace = "foo"`. The
|
|
59
|
+
* kubeconfig file that is used can be overridden using the [`KUBECONFIG` environment
|
|
60
|
+
* variable](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#the-kubeconfig-environment-variable)).
|
|
61
|
+
*/
|
|
62
|
+
export declare const kubernetes: outputs.config.Kubernetes | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Authentication password. Can be set through the `ARGOCD_AUTH_PASSWORD` environment variable.
|
|
65
|
+
*/
|
|
66
|
+
export declare const password: string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Whether to initiate an unencrypted connection to ArgoCD server.
|
|
69
|
+
*/
|
|
70
|
+
export declare const plainText: boolean | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Connect to a random argocd-server port using port forwarding.
|
|
73
|
+
*/
|
|
74
|
+
export declare const portForward: boolean | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Namespace name which should be used for port forwarding.
|
|
77
|
+
*/
|
|
78
|
+
export declare const portForwardWithNamespace: string | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* ArgoCD server address with port. Can be set through the `ARGOCD_SERVER` environment variable.
|
|
81
|
+
*/
|
|
82
|
+
export declare const serverAddr: string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Use the authentication settings found in the local config file. Useful when you have previously logged in using SSO.
|
|
85
|
+
* Conflicts with `authToken`, `username` and `password`.
|
|
86
|
+
*/
|
|
87
|
+
export declare const useLocalConfig: boolean | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* User-Agent request header override.
|
|
90
|
+
*/
|
|
91
|
+
export declare const userAgent: string | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* Authentication username. Can be set through the `ARGOCD_AUTH_USERNAME` environment variable.
|
|
94
|
+
*/
|
|
95
|
+
export declare const username: string | undefined;
|