Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENTESB-17407: Allow to specify HTTP Proxy settings #80

Merged
merged 37 commits into from
Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
74f3d28
chore(cli): Add operator env vars option to install CLI
astefanutti Oct 4, 2021
69919b6
fix(e2e): Effectively deactivate Kamelets install in builder e2e tests
astefanutti Oct 4, 2021
b29a694
feat(trait): environment variables
squakez Sep 20, 2021
7f604aa
feat(maven): Support platform Maven settings
astefanutti Jan 6, 2022
92fd324
feat(maven): Honor proxy environment variables
astefanutti Jan 6, 2022
02d81b0
chore(maven): Default to standard HTTP and HTTPS port numbers
astefanutti Jan 6, 2022
a55929a
chore(maven): Set Maven proxy ID in global settings
astefanutti Jan 7, 2022
82f31d0
chore(maven): Convert NO_PROXY to http.nonProxyHosts JVM system prope…
astefanutti Jan 7, 2022
395e4b1
feat(maven): HTTP proxy e2e tests
astefanutti Jan 7, 2022
fbb18b1
fix(proxy): HTTPS proxy can use HTTP scheme
astefanutti Jan 7, 2022
8163982
chore(e2e): Set NO_PROXY with the Kubernetes service cluster IPs
astefanutti Jan 7, 2022
6b2615f
chore(maven): Add default Maven repositories to global settings
astefanutti Jan 7, 2022
ff685ef
chore(maven): Separate user and platform Maven settings
astefanutti Jan 7, 2022
e7751c8
chore(api): Remove Maven repositories from the platform API
astefanutti Jan 7, 2022
f60540d
chore: Fix lints
astefanutti Jan 7, 2022
3188eee
chore(maven): Unify settings API
astefanutti Jan 10, 2022
598dfde
chore(e2e): Add extra RBAC permissions for the HTTP proxy tests
astefanutti Jan 10, 2022
d36495d
feat(trait): Propagate HTTP proxy env variables to integration Pods
astefanutti Jan 10, 2022
a5abed6
chore(e2e): Add environment trait e2e tests
astefanutti Jan 10, 2022
259bce5
feat(jvm): Translate HTTP proxy env variables into system properties
astefanutti Jan 10, 2022
339fb65
chore(jvm): Fail fast when no integration container is found
astefanutti Jan 10, 2022
5656890
chore(jvm): Rely on default JVM HTTP proxy port numbers
astefanutti Jan 10, 2022
faf2999
fix(jvm): NO_PROXY translates to -Dhttp.nonProxyHosts
astefanutti Jan 10, 2022
b5a2b27
fix(jvm): Quote HTTP proxy system property values
astefanutti Jan 10, 2022
662d753
fix(e2e): Add Maven repositories to NO_PROXY
astefanutti Jan 10, 2022
562d6e3
fix(e2e): Add container registry to NO_PROXY
astefanutti Jan 11, 2022
0403ffb
feat: Propagate HTTP proxy environment to build Pods
astefanutti Jan 11, 2022
4c20e0a
fix(e2e): assert downward API in environment trait tests
astefanutti Jan 11, 2022
310440c
chore(api): Remove HTTP proxy Secret
astefanutti Jan 11, 2022
73b3f07
fix(e2e): Use different integrations in environment trait tests
astefanutti Jan 11, 2022
63c3dfd
chore(e2e): assert HTTP proxy logs
astefanutti Jan 11, 2022
c5f1a49
chore: Rebuild resources
astefanutti Jan 18, 2022
929899b
feat: Add HTTP proxy documentation
astefanutti Jan 12, 2022
933f491
chore(e2e): Move HTTPD resources creation in separate functions
astefanutti Jan 12, 2022
16c5528
fix http-proxy-docs
djencks Jan 13, 2022
23a60d8
fix(e2e): Set NO_PROXY to wildcard for the environment trait tests
astefanutti Jan 20, 2022
b3e39af
chore: Update vendor directory
astefanutti Feb 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ jobs:
export KAMEL_INSTALL_REGISTRY=$KIND_REGISTRY
export KAMEL_INSTALL_REGISTRY_INSECURE=true
export KAMEL_INSTALL_OPERATOR_IMAGE=$KIND_REGISTRY/apache/camel-k:$(make get-version)
export KAMEL_INSTALL_OPERATOR_ENV_VARS=KAMEL_INSTALL_DEFAULT_KAMELETS=false

# Configure test options
export CAMEL_K_TEST_IMAGE_NAME=$KIND_REGISTRY/apache/camel-k
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/openshift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,34 @@ jobs:
apiGroup: rbac.authorization.k8s.io
EOF

# Grant read permission on the Kubernetes Service to the default developer user
# Required by the HTTP proxy tests
cat <<EOF | oc apply -f -
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: camel-k-test:kubernetes-service
rules:
- apiGroups: [""]
resources: ["services"]
verbs: ["get"]
resourceNames: ["kubernetes"]
EOF
cat <<EOF | oc apply -f -
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: default
name: camel-k-test:kubernetes-service
subjects:
- kind: User
name: developer
roleRef:
kind: ClusterRole
name: camel-k-test:kubernetes-service
apiGroup: rbac.authorization.k8s.io
EOF

# Login as normal user
oc login -u developer

Expand Down
23 changes: 11 additions & 12 deletions config/crd/bases/camel.apache.org_builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ spec:
type: string
contextDir:
type: string
httpProxySecret:
type: string
image:
type: string
name:
Expand Down Expand Up @@ -134,7 +132,7 @@ spec:
type: string
type: array
maven:
description: MavenSpec --
description: MavenBuildSpec --
properties:
caSecret:
description: The Secret name and key, containing the
Expand Down Expand Up @@ -164,9 +162,9 @@ spec:
- key
type: object
extension:
description: Maven build extensions https://maven.apache.org/guides/mini/guide-using-extensions.html
description: The Maven build extensions. See https://maven.apache.org/guides/mini/guide-using-extensions.html.
items:
description: MavenArtifact --
description: MavenArtifact defines a Maven artifact
properties:
artifactId:
type: string
Expand All @@ -188,15 +186,17 @@ spec:
description: The Maven properties.
type: object
repositories:
description: The Maven repositories.
items:
description: Repository --
description: Repository defines a Maven repository
properties:
id:
type: string
name:
type: string
releases:
description: RepositoryPolicy --
description: RepositoryPolicy defines the policy
associated to a Maven repository
properties:
checksumPolicy:
type: string
Expand All @@ -208,7 +208,8 @@ spec:
- enabled
type: object
snapshots:
description: RepositoryPolicy --
description: RepositoryPolicy defines the policy
associated to a Maven repository
properties:
checksumPolicy:
type: string
Expand Down Expand Up @@ -316,7 +317,7 @@ spec:
properties:
dependencies:
items:
description: MavenArtifact --
description: MavenArtifact defines a Maven artifact
properties:
artifactId:
type: string
Expand All @@ -339,7 +340,7 @@ spec:
type: object
dependencies:
items:
description: MavenArtifact --
description: MavenArtifact defines a Maven artifact
properties:
artifactId:
type: string
Expand Down Expand Up @@ -434,8 +435,6 @@ spec:
type: object
contextDir:
type: string
httpProxySecret:
type: string
image:
type: string
name:
Expand Down
6 changes: 3 additions & 3 deletions config/crd/bases/camel.apache.org_camelcatalogs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ spec:
type: string
dependencies:
items:
description: MavenArtifact --
description: MavenArtifact defines a Maven artifact
properties:
artifactId:
type: string
Expand Down Expand Up @@ -264,7 +264,7 @@ spec:
properties:
dependencies:
items:
description: MavenArtifact --
description: MavenArtifact defines a Maven artifact
properties:
artifactId:
type: string
Expand All @@ -287,7 +287,7 @@ spec:
type: object
dependencies:
items:
description: MavenArtifact --
description: MavenArtifact defines a Maven artifact
properties:
artifactId:
type: string
Expand Down
90 changes: 4 additions & 86 deletions config/crd/bases/camel.apache.org_integrationplatforms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ spec:
- routine
- pod
type: string
httpProxySecret:
type: string
kanikoBuildCache:
type: boolean
maven:
Expand Down Expand Up @@ -108,9 +106,9 @@ spec:
- key
type: object
extension:
description: Maven build extensions https://maven.apache.org/guides/mini/guide-using-extensions.html
description: The Maven build extensions. See https://maven.apache.org/guides/mini/guide-using-extensions.html.
items:
description: MavenArtifact --
description: MavenArtifact defines a Maven artifact
properties:
artifactId:
type: string
Expand All @@ -131,45 +129,6 @@ spec:
type: string
description: The Maven properties.
type: object
repositories:
items:
description: Repository --
properties:
id:
type: string
name:
type: string
releases:
description: RepositoryPolicy --
properties:
checksumPolicy:
type: string
enabled:
type: boolean
updatePolicy:
type: string
required:
- enabled
type: object
snapshots:
description: RepositoryPolicy --
properties:
checksumPolicy:
type: string
enabled:
type: boolean
updatePolicy:
type: string
required:
- enabled
type: object
url:
type: string
required:
- id
- url
type: object
type: array
settings:
description: A reference to the ConfigMap or Secret key that
contains the Maven settings.
Expand Down Expand Up @@ -317,8 +276,6 @@ spec:
- routine
- pod
type: string
httpProxySecret:
type: string
kanikoBuildCache:
type: boolean
maven:
Expand Down Expand Up @@ -349,9 +306,9 @@ spec:
- key
type: object
extension:
description: Maven build extensions https://maven.apache.org/guides/mini/guide-using-extensions.html
description: The Maven build extensions. See https://maven.apache.org/guides/mini/guide-using-extensions.html.
items:
description: MavenArtifact --
description: MavenArtifact defines a Maven artifact
properties:
artifactId:
type: string
Expand All @@ -372,45 +329,6 @@ spec:
type: string
description: The Maven properties.
type: object
repositories:
items:
description: Repository --
properties:
id:
type: string
name:
type: string
releases:
description: RepositoryPolicy --
properties:
checksumPolicy:
type: string
enabled:
type: boolean
updatePolicy:
type: string
required:
- enabled
type: object
snapshots:
description: RepositoryPolicy --
properties:
checksumPolicy:
type: string
enabled:
type: boolean
updatePolicy:
type: string
required:
- enabled
type: object
url:
type: string
required:
- id
- url
type: object
type: array
settings:
description: A reference to the ConfigMap or Secret key that
contains the Maven settings.
Expand Down
8 changes: 8 additions & 0 deletions deploy/traits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,14 @@ traits:
type: bool
description: Enables injection of `NAMESPACE` and `POD_NAME` environment variables
(default `true`)
- name: http-proxy
type: bool
description: Propagates the `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment
variables (default `true`)
- name: vars
type: '[]string'
description: A list of variables to be created on the Pod. Must have KEY=VALUE
syntax (ie, MY_VAR="my value").
- name: error-handler
platform: true
profiles:
Expand Down
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
** xref:configuration/runtime-properties.adoc[Properties]
** xref:configuration/runtime-config.adoc[Runtime configuration]
** xref:configuration/runtime-resources.adoc[Runtime resources]
** xref:configuration/http-proxy.adoc[HTTP Proxy]
** xref:configuration/maven.adoc[Maven]
* Observability
** xref:observability/logging.adoc[Logging]
Expand Down