Skip to content

Commit 2fc87b6

Browse files
author
edge-katanomi-app2[bot]
committed
📚 Sync docs from alaudadevops/connectors-operator on 24a919d0ba9df99d8040015b826b26bae5c7573e
Source: feat: add pypi connector crd. (#229) Author: kycheng Ref: refs/heads/main Commit: 24a919d0ba9df99d8040015b826b26bae5c7573e This commit automatically syncs documentation changes from the source-docs repository. 🔗 View source commit: https://github.com/alaudadevops/connectors-operator/commit/24a919d0ba9df99d8040015b826b26bae5c7573e 🤖 Synced on 2025-10-10 13:43:52 UTC
1 parent 7775834 commit 2fc87b6

File tree

15 files changed

+719
-6
lines changed

15 files changed

+719
-6
lines changed

‎.github/SYNC_INFO.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Documentation Sync Information
22

3-
- **Last synced**: 2025-09-24 03:20:54 UTC
3+
- **Last synced**: 2025-10-10 13:43:52 UTC
44
- **Source repository**: alaudadevops/connectors-operator
5-
- **Source commit**: [c4e63e243babd2feb9f950ed73ebebda22b7c100](https://github.com/alaudadevops/connectors-operator/commit/c4e63e243babd2feb9f950ed73ebebda22b7c100)
6-
- **Triggered by**: chengjingtao
7-
- **Workflow run**: [#35](https://github.com/alaudadevops/connectors-operator/actions/runs/17965310900)
5+
- **Source commit**: [24a919d0ba9df99d8040015b826b26bae5c7573e](https://github.com/alaudadevops/connectors-operator/commit/24a919d0ba9df99d8040015b826b26bae5c7573e)
6+
- **Triggered by**: edge-katanomi-app2[bot]
7+
- **Workflow run**: [#36](https://github.com/alaudadevops/connectors-operator/actions/runs/18408393729)
88

99
## Files synced:
1010
- docs/

‎docs/en/connectors-pypi/.gitkeep‎

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
development/**
2+
keps/**
3+
godocs/**
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
weight: 40
3+
i18n:
4+
title:
5+
en: Concepts
6+
title: Concepts
7+
---
8+
9+
# PyPI Connector
10+
11+
<Overview />
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
---
2+
weight: 20
3+
---
4+
5+
# PyPI Connector
6+
7+
The PyPI connector is a platform-agnostic connector that you can use to connect to any PyPI registry.
8+
9+
You can use the PyPI Connector to securely perform PyPI operations in CICD pipelines, or use it in kubernetes workloads to perform PyPI operations without credentials.
10+
11+
Additionally, you can centralize the management of PyPI access configurations across namespaces, avoiding the need to repeat the PyPI credentials in each namespace.
12+
13+
## Overview
14+
15+
This document covers:
16+
17+
- **Integration Requirements**: Prerequisites for target PyPI registries
18+
- **Creating PyPI connector**
19+
- **Advanced Features**: Proxy capabilities and configuration capabilities about PyPI connector
20+
21+
## Integration Requirements
22+
23+
**PyPI Registries Prerequisites**
24+
25+
- The PyPI registry must be able to support [Simple Repository API](https://peps.python.org/pep-0503/)
26+
27+
## Creating a simple PyPI connector
28+
29+
Here's how to create a basic PyPI Connector:
30+
31+
```yaml
32+
# PyPI Connector
33+
apiVersion: connectors.alauda.io/v1alpha1
34+
kind: Connector
35+
metadata:
36+
name: pypi-connector
37+
spec:
38+
connectorClassName: pypi
39+
address: https://pypi.org
40+
```
41+
42+
## Fields Reference
43+
44+
**spec.connectorClassName**:
45+
46+
`pypi` (constant), specifies the ConnectorClass name for PyPI integration.
47+
48+
**spec.address**:
49+
50+
Target PyPI registry address, for example: `https://pypi.org`.
51+
52+
**spec.auth(optional)**:
53+
54+
specifies the authentication method of the PyPI registry
55+
56+
- `spec.auth.name`: should be `basicAuth` for PyPI connector.
57+
58+
- `spec.auth.secretRef`: specifies the secret that contains the authentication information of the PyPI registry, the secret should be created in the same namespace as the connector. If your PyPI registry does not require authentication, you can omit this field.
59+
60+
**Optional Metadata fields**:
61+
62+
- `cpaas.io/description`: Description information for the PyPI connector, for example:
63+
64+
```yaml
65+
apiVersion: connectors.alauda.io/v1alpha1
66+
kind: Connector
67+
metadata:
68+
name: pypi-connector
69+
annotations:
70+
cpaas.io/description: "Connect to team development PyPI registry"
71+
```
72+
73+
## Capabilities of PyPI Connector
74+
75+
### Authentication
76+
77+
The PyPI connector supports the following authentication types:
78+
79+
- `basicAuth`: Username and password-based authentication, corresponding secret type: `kubernetes.io/basic-auth`
80+
81+
For example:
82+
83+
```yaml
84+
apiVersion: v1
85+
stringData:
86+
username: your-pypi-registry-username
87+
password: your-pypi-registry-password
88+
kind: Secret
89+
metadata:
90+
name: pypi-secret
91+
type: kubernetes.io/basic-auth
92+
```
93+
94+
For comprehensive status information, see [Connector Status Documentation](../../connectors/concepts/connector.mdx#status-information).
95+
96+
### Proxy and pip.conf, .pypirc Configuration
97+
98+
To provide clients with the ability to access PyPI registry without credentials, the PyPI connector provides a proxy server to automatically inject authentication information.
99+
100+
Clients can use this proxy server to access PyPI registry without needing to configure credentials on the client side.
101+
102+
To simplify usage, the PyPI connectorclass provides `pip.conf` and `.pypirc` files that can be mounted into Pods via CSI. In the Pod, when executing PyPI operations, the proxy service can be automatically inject authentication information.
103+
104+
#### Proxy Address
105+
106+
Upon Connector creation, the system automatically provisions a proxy service for the target PyPI registry.
107+
108+
The proxy endpoint is recorded in `status.proxy.httpAddress`:
109+
110+
For example:
111+
112+
```yaml
113+
apiVersion: connectors.alauda.io/v1alpha1
114+
kind: Connector
115+
metadata:
116+
name: pypi-connector
117+
spec:
118+
# connector spec fields
119+
status:
120+
conditions:
121+
# status conditions
122+
proxy:
123+
httpAddress:
124+
url: http://c-pypi-connector.default.svc.cluster.local
125+
```
126+
127+
#### pip.conf configuration file \{#pipconf-configuration-file}
128+
129+
The PyPI connector provides the following configuration:
130+
131+
**pip.conf**:
132+
133+
- Provides a `pip.conf` configuration file. Combined with the connector-csi-driver, this configuration file will be mounted into the Pod, allowing access to the PyPI registry through the proxy without needing to configure credentials on the client side.
134+
135+
Example of the configuration file generated in the Pod:
136+
137+
```ini
138+
[global]
139+
index-url = http://connectors-pypi-demo-pypi-connector:eyJhbGciOiJEnEZaTQ@c-pypi-connector.connectors-pypi-demo.svc.cluster.local/simple/
140+
timeout = 30
141+
142+
[install]
143+
trusted-host = c-pypi-connector.connectors-pypi-demo.svc.cluster.local
144+
```
145+
146+
#### .pypirc configuration file \{#pypirc-configuration-file}
147+
148+
- Provides a `.pypirc` configuration file. Combined with the connector-csi-driver, this configuration file will be mounted into the Pod, allowing access to the PyPI registry through the proxy without needing to configure credentials on the client side.
149+
150+
```ini
151+
[distutils]
152+
index-servers = connectors-pypi
153+
154+
[connectors-pypi]
155+
repository = http://c-pypi-connector.connectors-pypi-demo.svc.cluster.local/
156+
username = connectors-pypi-demo-pypi-connector
157+
password = eyJhbGciOiJEnEZaTQ
158+
```
159+
160+
For detailed proxy mechanics, see [How It Works](../quick_start.mdx#what-happens-under-the-hood) in the Quick Start guide.
161+
162+
163+
#### Using Connectors CSI Driver to mount pip.conf and .pypirc file \{#using-connectors-csi-driver-to-mount-pipconf-file}
164+
165+
The PyPI connector provides a `pip.conf` and `.pypirc` file that can be mounted into the Pod via Connector CSI Driver.
166+
167+
For example:
168+
169+
``` yaml
170+
spec:
171+
volumes:
172+
- name: pip.conf
173+
csi:
174+
readOnly: true
175+
driver: connectors-csi
176+
volumeAttributes:
177+
connector.name: "pypi-connector"
178+
configuration.names: "pipconf"
179+
- name: pypirc
180+
csi:
181+
readOnly: true
182+
driver: connectors-csi
183+
volumeAttributes:
184+
connector.name: "pypi-connector"
185+
configuration.names: "pypirc"
186+
```
187+
188+
parameter descriptions:
189+
190+
- `csi.readOnly`: Fixed value `true`
191+
- `csi.driver`: The Connector CSI Driver, fixed as `connectors-csi`.
192+
- `csi.volumeAttributes`: CSI Volume attributes
193+
- `connector.name`: Name of the PyPI Connector
194+
- `connector.namespace`: Namespace of the PyPI Connector; if not specified, the Pod's namespace is used
195+
- `configuration.names`: Configuration name, provide by the PyPI Connector. As above, `pipconf` and `pypirc` are supported.
196+
197+
For detailed information about how to use the `pip.conf` and `.pypirc` file in the Pod by connectors-csi-driver, please refer to [Using PyPI Connectors in kubernetes jobs](../quick_start.mdx)
198+
199+
## Further Reading
200+
201+
- [Using PyPI Connectors as Distribution Management Repository](../quick_start.mdx)
202+
- [Using PyPI Connectors in Tekton Pipelines](../how_to/using-in-tekton-task.mdx)
203+
204+
## References
205+
206+
- [Concepts of Connector](../../connectors/concepts/connector.mdx)
207+
- [Connector Proxy](../../connectors/concepts/connectors_proxy.mdx)
208+
- [Connector CSI Driver](../../connectors/concepts/connectors_csi.mdx)
209+
- [Kubernetes CSI Volume](https://kubernetes.io/docs/concepts/storage/volumes/#csi)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
weight: 60
3+
i18n:
4+
title:
5+
en: How To
6+
title: How To
7+
---
8+
9+
# Practical Guide
10+
11+
<Overview />
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
weight: 20
3+
title: Using PyPI Connector in Tekton Task
4+
---
5+
6+
# Using PyPI Connector in Tekton Task
7+
8+
Using PyPI Connector in Tekton Tasks enables centralized management of tool integration information and secure access to PyPI registry during Tekton Task execution.
9+
10+
## Requirements for Tekton Task
11+
12+
Not all Tekton Tasks can use PyPI Connector.
13+
14+
PyPI Connector essentially injects temporary PyPI credentials through a Connector CSI Driver. It provides a configuration named `pip.conf` and `pypirc` that generates a `pip.conf` and `.pypirc` file with temporary authentication for trust the connector proxy server.
15+
16+
Therefore, Tekton Tasks must meet the following requirements to use PyPI Connector:
17+
18+
**Support mounting a `pip.conf` and `pypirc` file via Workspace**
19+
20+
## Usage Instructions
21+
22+
After confirming that your Tekton Task can use PyPI Connector, you can add PyPI Connector to the TaskRun YAML file:
23+
24+
For example:
25+
26+
```yaml
27+
apiVersion: tekton.dev/v1
28+
kind: TaskRun
29+
metadata:
30+
name: pypi-connector-demo
31+
spec:
32+
# . . .
33+
workspaces:
34+
- name: pip.conf
35+
csi:
36+
driver: connectors-csi
37+
readOnly: true
38+
volumeAttributes:
39+
connector.name: pypi-connector
40+
connector.namespace: ""
41+
configuration.names: "pipconf"
42+
- name: pypirc
43+
csi:
44+
driver: connectors-csi
45+
readOnly: true
46+
volumeAttributes:
47+
connector.name: pypi-connector
48+
connector.namespace: ""
49+
configuration.names: "pypirc"
50+
```
51+
52+
After mounting, the configuration needs to be moved to `~/.pip/pip.conf` and `~/.pypirc` to take effect by default.
53+
54+
For workspaces parameters, please refer to [Using Connectors CSI Driver to mount pip.conf and pypirc file](../concepts/pypi_connectorclass.mdx#using-connectors-csi-driver-to-mount-pipconf-file) in PyPI Connector Concepts document.
55+
56+
For more information about Connectors CSI Driver, please refer to [Connectors CSI Configuration](../../connectors/concepts/connectors_csi.mdx).
57+
58+
## Further Reading
59+
60+
- [Using PyPI Connectors as Distribution Management Repository](../quick_start.mdx)
61+
62+
## References
63+
64+
- [Using CSI Volumes in Tekton](https://tekton.dev/docs/pipelines/workspaces/#csi)
65+
- [Connectors CSI Configuration](../../connectors/concepts/connectors_csi.mdx)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# PyPI Connector
2+
3+
<Overview overviewHeaders={[]} />
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
weight: 10
3+
---
4+
5+
# Introduction
6+
7+
## What is PyPI Connector
8+
9+
PyPI Connector is a specialized connector component that enables secure and convenient integration with PyPI Registry, allowing users to interact with PyPI Registry secretlessly in clients like `pip`, `twine`.
10+
11+
Once PyPI Connector Component is deployed, users can:
12+
13+
- Create PyPI connectors to integrate with various PyPI Registries (PyPI repository hosted by Nexus, Artifactory, etc.)
14+
- Perform `pip` and `twine` operations in CI/CD pipelines or kubernetes workloads without directly handling credentials.
15+
16+
## Application Scenarios
17+
18+
The PyPI Connector allows you to perform `pip` and `twine` operations securely by:
19+
20+
- Managing credentials centrally rather than hardcoding them in clients
21+
- Automatically injecting authentication during the `pip` and `twine` operations
22+
23+
This approach is particularly useful for:
24+
25+
- `CI/CD pipelines` or `kubernetes jobs` requiring access PyPI Registry
26+
- Teams sharing PyPI Registry access without sharing credentials
27+
- Environments requiring centralized management of PyPI Registry credentials without distributing credentials to each client

0 commit comments

Comments
 (0)