Skip to content

Commit e75a3d8

Browse files
janardhan-rafaymvgautham-rafay
authored andcommitted
RC-42710 Support for proxyconfig for import cluster
(cherry picked from commit 621e9cc) Support for proxyconfig in import cluster model (cherry picked from commit 94f2c93) Support for proxyconfig for import cluster.Fixed the panic and the schema.Now able to apply (cherry picked from commit c40df9b) Validating proxy config fields while building object (cherry picked from commit e87ccef) Added all the fields from proxy config for input via terraform spec (cherry picked from commit d0e01e1) RC-44138 Fixed NPE (cherry picked from commit 998fed8) RC-42710 Docs update (cherry picked from commit 22608d1)
1 parent 3de0653 commit e75a3d8

File tree

4 files changed

+146
-109
lines changed

4 files changed

+146
-109
lines changed

docs/resources/import_cluster.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ resource "rafay_import_cluster" "import_cluster" {
2828
}
2929
kubernetes_provider = "AKS"
3030
provision_environment = "CLOUD"
31+
32+
proxy_config {
33+
http_proxy = "http://10.100.0.10:8080/"
34+
https_proxy = "http://10.100.0.10:8080/"
35+
no_proxy = "10.0.0.0/16,localhost,127.0.0.1,internal-service.svc,webhook.svc,10.100.0.0/24,custom-dns.example.com,10.200.0.0/16,10.101.0.0/12,169.254.169.254,.internal.example.com,168.63.129.16,proxy,master.service.consul,10.240.0.0/16,drift-service.svc,*.privatelink.example.com,.privatelink.example.com"
36+
enabled = true
37+
proxy_auth = "username:password"
38+
allow_insecure_bootstrap = false
39+
bootstrap_ca = "<ca-certificate-data>"
40+
}
3141
}
3242
3343
output "values_data" {
@@ -66,6 +76,14 @@ output "bootstrap_path" {
6676
- `provision_environment` (String) This field is used to define the type of environment. The supported values are `CLOUD` and `ONPREM`
6777
- `values_path` - (String) The path to save the `values.yaml` file to. This is an optional parameter. If path is provided values.yaml will be downloaded to that path. Otherwise values.yaml will be downloaded to current directory and this output variable will be populated with path to the downloaded file.
6878
- `bootstrap_path` - (String) The path to save the `bootstrap.yaml` file to. This is an optional parameter. If path is provided bootstrap.yaml will be downloaded to that path. Otherwise bootstrap.yaml will be downloaded to current directory and this output variable will be populated with path to the downloaded file.
79+
- `proxy_config` - (Block, Optional) Proxy configuration for the cluster. Only one block can be specified. The following attributes are supported:
80+
- `http_proxy` - (String, Optional) HTTP proxy URL.
81+
- `https_proxy` - (String, Optional) HTTPS proxy URL.
82+
- `no_proxy` - (String, Optional) Comma-separated list of hosts that should bypass the proxy.
83+
- `enabled` - (Boolean, Optional) Whether proxy is enabled.
84+
- `proxy_auth` - (String, Optional) Proxy authentication string.
85+
- `allow_insecure_bootstrap` - (Boolean, Optional) Allow insecure bootstrap.
86+
- `bootstrap_ca` - (String, Optional) CA certificate for bootstrap.
6987
- `timeouts` - (Block) Sets the duration of time the create, delete, and update functions are allowed to run. If the function takes longer than this, it is assumed the function has failed. The default is 10 minutes. (See [below for nested schema](#nestedblock--timeouts))
7088

7189
<a id="nestedblock--timeouts"></a>

examples/resources/rafay_import_cluster/resource.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ resource "rafay_import_cluster" "import_cluster" {
1212
}
1313
kubernetes_provider = "AKS"
1414
provision_environment = "CLOUD"
15+
16+
proxy_config {
17+
http_proxy = "http://10.100.0.10:8080/"
18+
https_proxy = "http://10.100.0.10:8080/"
19+
no_proxy = "10.0.0.0/16,localhost,127.0.0.1,internal-service.svc,webhook.svc,10.100.0.0/24,custom-dns.example.com,10.200.0.0/16,10.101.0.0/12,169.254.169.254,.internal.example.com,168.63.129.16,proxy,master.service.consul,10.240.0.0/16,drift-service.svc,*.privatelink.example.com,.privatelink.example.com"
20+
enabled = true
21+
proxy_auth = "username:password"
22+
allow_insecure_bootstrap = false
23+
bootstrap_ca = "<ca-certificate-data>"
24+
}
1525
}
1626

1727
output "values_data" {

go.mod

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
module github.com/RafaySystems/terraform-provider-rafay
22

3-
go 1.23.0
3+
go 1.24.0
44

5-
toolchain go1.23.4
5+
toolchain go1.24.7
66

77
require (
88
github.com/RafaySystems/edge-common v1.24.1-0.20240905053610-494a83a439f8
9-
github.com/RafaySystems/rafay-common v1.29.1-rc2.0.20250826035636-c2db98684108
10-
github.com/RafaySystems/rctl v1.29.1-0.20250826082044-368db2bdc79d
9+
github.com/RafaySystems/rafay-common v1.29.1-rc2.0.20250929083432-f46a58f05f26
10+
github.com/RafaySystems/rctl v1.29.1-0.20250926062505-a7798d489b13
1111
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
1212
github.com/go-yaml/yaml v2.1.0+incompatible
1313
github.com/goccy/go-yaml v1.9.5
14-
github.com/google/go-cmp v0.6.0
14+
github.com/google/go-cmp v0.7.0
1515
github.com/hashicorp/terraform-plugin-framework v1.11.0
1616
github.com/hashicorp/terraform-plugin-framework-validators v0.13.0
1717
github.com/hashicorp/terraform-plugin-mux v0.16.0
@@ -28,18 +28,18 @@ require (
2828
require (
2929
github.com/IBM/sarama v1.43.2 // indirect
3030
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
31-
github.com/RafaySystems/eaas-playground/proto v0.0.0-20250822132720-7ea3c7618efa // indirect
32-
github.com/RafaySystems/paas-common v0.0.0-20250407132001-0d707c610b95 // indirect
31+
github.com/RafaySystems/eaas-playground/proto v0.0.0-20250908112817-fd12aec1c75d // indirect
32+
github.com/RafaySystems/paas-common v0.0.0-20250519095800-e92646adcd6e // indirect
3333
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
3434
github.com/beorn7/perks v1.0.1 // indirect
3535
github.com/bits-and-blooms/bitset v1.13.0 // indirect
3636
github.com/blang/semver v3.5.1+incompatible // indirect
3737
github.com/blang/semver/v4 v4.0.0 // indirect
3838
github.com/cespare/xxhash/v2 v2.3.0 // indirect
3939
github.com/cloudflare/circl v1.3.7 // indirect
40-
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
40+
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
4141
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
42-
github.com/fsnotify/fsnotify v1.7.0 // indirect
42+
github.com/fsnotify/fsnotify v1.9.0 // indirect
4343
github.com/gomatic/clock v1.0.0 // indirect
4444
github.com/google/gnostic v0.6.9 // indirect
4545
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
@@ -59,9 +59,10 @@ require (
5959
github.com/prometheus/common v0.54.0 // indirect
6060
github.com/prometheus/procfs v0.15.1 // indirect
6161
github.com/segmentio/asm v1.2.0 // indirect
62-
go.opentelemetry.io/otel/metric v1.29.0 // indirect
63-
golang.org/x/mod v0.20.0 // indirect
64-
golang.org/x/tools v0.24.0 // indirect
62+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
63+
go.opentelemetry.io/otel/metric v1.35.0 // indirect
64+
golang.org/x/mod v0.21.0 // indirect
65+
golang.org/x/tools v0.26.0 // indirect
6566
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
6667
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
6768
k8s.io/apiextensions-apiserver v0.30.1 // indirect
@@ -89,13 +90,13 @@ require (
8990
github.com/go-logr/stdr v1.2.2 // indirect
9091
github.com/go-openapi/analysis v0.23.0 // indirect
9192
github.com/go-openapi/errors v0.22.0 // indirect
92-
github.com/go-openapi/jsonpointer v0.21.0 // indirect
93+
github.com/go-openapi/jsonpointer v0.21.1 // indirect
9394
github.com/go-openapi/jsonreference v0.21.0 // indirect
9495
github.com/go-openapi/loads v0.22.0 // indirect
9596
github.com/go-openapi/runtime v0.28.0 // indirect
9697
github.com/go-openapi/spec v0.21.0 // indirect
9798
github.com/go-openapi/strfmt v0.23.0 // indirect
98-
github.com/go-openapi/swag v0.23.0 // indirect
99+
github.com/go-openapi/swag v0.23.1 // indirect
99100
github.com/go-openapi/validate v0.24.0 // indirect
100101
github.com/go-pg/pg v8.0.7+incompatible // indirect
101102
github.com/go-pg/pg/v10 v10.11.1 // indirect
@@ -109,7 +110,7 @@ require (
109110
github.com/google/gofuzz v1.2.0 // indirect
110111
github.com/google/uuid v1.6.0 // indirect
111112
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
112-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
113+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
113114
github.com/hashicorp/errwrap v1.1.0 // indirect
114115
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
115116
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
@@ -139,10 +140,10 @@ require (
139140
github.com/josharian/intern v1.0.0 // indirect
140141
github.com/json-iterator/go v1.1.12
141142
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
142-
github.com/klauspost/compress v1.17.9 // indirect
143+
github.com/klauspost/compress v1.18.0 // indirect
143144
github.com/levigross/grequests v0.0.0-20190908174114-253788527a1a // indirect
144145
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
145-
github.com/mailru/easyjson v0.7.7 // indirect
146+
github.com/mailru/easyjson v0.9.0 // indirect
146147
github.com/mattn/go-colorable v0.1.13 // indirect
147148
github.com/mattn/go-isatty v0.0.20 // indirect
148149
github.com/mattn/go-runewidth v0.0.14 // indirect
@@ -167,7 +168,7 @@ require (
167168
github.com/spacemonkeygo/httpsig v0.0.0-20181218213338-2605ae379e47 // indirect
168169
github.com/speps/go-hashids v2.0.0+incompatible // indirect
169170
github.com/spf13/cobra v1.8.1 // indirect
170-
github.com/spf13/pflag v1.0.5 // indirect
171+
github.com/spf13/pflag v1.0.6 // indirect
171172
github.com/tidwall/gjson v1.17.1 // indirect
172173
github.com/tidwall/match v1.1.1 // indirect
173174
github.com/tidwall/pretty v1.2.1 // indirect
@@ -182,34 +183,34 @@ require (
182183
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
183184
github.com/zclconf/go-cty v1.15.0 // indirect
184185
go.mongodb.org/mongo-driver v1.15.0 // indirect
185-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect
186-
go.opentelemetry.io/otel v1.29.0 // indirect
187-
go.opentelemetry.io/otel/trace v1.29.0 // indirect
186+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect
187+
go.opentelemetry.io/otel v1.35.0 // indirect
188+
go.opentelemetry.io/otel/trace v1.35.0 // indirect
188189
go.uber.org/multierr v1.11.0 // indirect
189-
golang.org/x/crypto v0.36.0 // indirect
190-
golang.org/x/net v0.31.0 // indirect
191-
golang.org/x/oauth2 v0.24.0 // indirect
192-
golang.org/x/sync v0.12.0 // indirect
193-
golang.org/x/sys v0.31.0 // indirect
194-
golang.org/x/term v0.30.0 // indirect
195-
golang.org/x/text v0.23.0 // indirect
196-
golang.org/x/time v0.8.0 // indirect
190+
golang.org/x/crypto v0.38.0 // indirect
191+
golang.org/x/net v0.40.0 // indirect
192+
golang.org/x/oauth2 v0.30.0 // indirect
193+
golang.org/x/sync v0.14.0 // indirect
194+
golang.org/x/sys v0.33.0 // indirect
195+
golang.org/x/term v0.32.0 // indirect
196+
golang.org/x/text v0.25.0 // indirect
197+
golang.org/x/time v0.11.0 // indirect
197198
google.golang.org/appengine v1.6.8 // indirect
198199
google.golang.org/genproto v0.0.0-20240610135401-a8a62080eff3 // indirect
199-
google.golang.org/genproto/googleapis/api v0.0.0-20240822170219-fc7c04adadcd // indirect
200-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240823204242-4ba0660f739c // indirect
201-
google.golang.org/grpc v1.65.0 // indirect
202-
google.golang.org/protobuf v1.35.2
200+
google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2 // indirect
201+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2 // indirect
202+
google.golang.org/grpc v1.72.0 // indirect
203+
google.golang.org/protobuf v1.36.6
203204
gopkg.in/inf.v0 v0.9.1 // indirect
204205
gopkg.in/yaml.v2 v2.4.0 // indirect
205206
k8s.io/api v1.16.4
206207
k8s.io/client-go v12.0.0+incompatible // indirect
207208
k8s.io/klog/v2 v2.130.1 // indirect
208-
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
209-
k8s.io/utils v0.0.0-20241104163129-6fe5fd82f078
209+
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
210+
k8s.io/utils v0.0.0-20250502105355-0f33e8f1c979
210211
sigs.k8s.io/controller-runtime v0.18.4 // indirect
211212
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
212-
sigs.k8s.io/structured-merge-diff/v4 v4.4.3 // indirect
213+
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
213214
sigs.k8s.io/yaml v1.4.0 // indirect
214215
)
215216

0 commit comments

Comments
 (0)