Skip to content

Commit 5cf7e3a

Browse files
committed
Updates for no_proxy and set imagePullPolicy=IfNotPresent on deployment
1 parent 0ed61e1 commit 5cf7e3a

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ $ oc create secret generic azproxy \
9090
--from-literal=AZP_PROXY_USERNAME=myuser \
9191
--from-literal=AZP_PROXY_PASSWORD=mypass \
9292
--from-literal=HTTP_PROXY=http://myuser:[email protected]:8888 \
93-
--from-literal=HTTPS_PROXY=https://myuser:[email protected]:8888
93+
--from-literal=HTTPS_PROXY=https://myuser:[email protected]:8888 \
94+
--from-literal=NO_PROXY=.cluster.local,.ec2.internal,.svc,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.<my-cluster-subdomain>,<my-cluster-subdomain>,localhost
9495
```
9596

9697
Unauthenticated proxy can be defined as follows:
@@ -99,7 +100,14 @@ Unauthenticated proxy can be defined as follows:
99100
$ oc create secret generic azproxy \
100101
--from-literal=AZP_PROXY_URL=http://192.168.0.1:8888 \
101102
--from-literal=HTTP_PROXY=http://192.168.0.1:8888 \
102-
--from-literal=HTTPS_PROXY=https://192.168.0.1:8888
103+
--from-literal=HTTPS_PROXY=https://192.168.0.1:8888 \
104+
--from-literal=NO_PROXY=.cluster.local,.ec2.internal,.svc,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.<my-cluster-subdomain>,<my-cluster-subdomain>,localhost
105+
```
106+
107+
The `NO_PROXY` proxy bypass configuration can be extracted from the [cluster-wide proxy]:
108+
109+
```
110+
oc get proxy -o jsonpath='{.items[0].status.no_proxy}'
103111
```
104112

105113
See the following table for a description of the above [environment variables]:
@@ -114,6 +122,7 @@ See the following table for a description of the above [environment variables]:
114122
| AZP_PROXY_PASSWORD | azproxy | (Optional) Proxy password for Agent. |
115123
| HTTP_PROXY | azproxy | (Optional) Configure container-wide proxy settings using `HTTP_PROXY` environment variable. |
116124
| HTTPS_PROXY | azproxy | (Optional) Configure container-wide proxy settings using `HTTPS_PROXY` environment variable. |
125+
| NO_PROXY | azproxy | (Optional) Configure container-wide proxy bypass settings using `NO_PROXY` environment variable. |
117126

118127
### 7. Deploy Build Agent
119128

@@ -144,17 +153,18 @@ Optionally, you can scale up pod replicas which will deploy additional agents.
144153
GPLv3
145154

146155
[set up a Personal Access Token]: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops#authenticate-with-a-personal-access-token-pat
147-
[proxy configuration]: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/proxy?view=azure-devops&tabs=unix
148156
[start.sh]: resources/start.sh
149157
[imagestream]: resources/imagestream.yaml
150158
[buildconfig]: resources/buildconfig.yaml
151159
[Azure Pipelines Agent]: https://github.com/Microsoft/azure-pipelines-agent/releases
152160
[creating a new SecurityContextConstraint]: https://www.redhat.com/sysadmin/rootless-podman-jenkins-openshift
153161
[nonroot-builder SCC]: resources/nonroot-builder.yaml
154162
[unattended config]: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops#unattended-config
163+
[proxy configuration]: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/proxy?view=azure-devops&tabs=unix
164+
[cluster-wide proxy]: https://docs.openshift.com/container-platform/latest/networking/enable-cluster-wide-proxy.html
155165
[environment variables]: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azure-devops#environment-variables
156-
[privately signed CA for your proxy]: https://docs.openshift.com/container-platform/latest/networking/configuring-a-custom-pki.html
157166
[deployment]: resources/deployment.yaml
167+
[privately signed CA for your proxy]: https://docs.openshift.com/container-platform/latest/networking/configuring-a-custom-pki.html
158168
[Modify the default Proxy object]: https://docs.openshift.com/container-platform/latest/security/certificates/updating-ca-bundle.html#ca-bundle-replacing_updating-ca-bundle
159169
[Inject the privately signed CA]: https://docs.openshift.com/container-platform/latest/networking/configuring-a-custom-pki.html#certificate-injection-using-operators_configuring-a-custom-pki
160170
[agent-with-custom-ca-deployment.yaml]: resources/agent-with-custom-ca-deployment.yaml

resources/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ spec:
1717
containers:
1818
- name: azure-build-agent
1919
image: azure-build-agent:latest
20+
imagePullPolicy: IfNotPresent
2021
envFrom:
2122
- secretRef:
2223
name: azdevops

0 commit comments

Comments
 (0)