Skip to main content

traits define demo:

name: demo
rules:
- name: never-restart
  path: .spec.template.spec.restartPolicy
  value: Never
  action: replace
- name: upper-name
  path: .spec.template.spec.containers.0.name
  value: Upper
  action: function
- name: default-tag
  path: .spec.template.spec.containers.0.image
  value: :latest
  action: concat
- name: default-env
  path: .spec.template.spec.containers.0.env
  value: 
    - name: PYTHONUNBUFFERD
      value: 1
  action: extend

template demo:

apiVersion: batch/v1
kind: Job
metadata:
  name: hello
spec:
  template:
    spec:
      containers:
      - name: hello
        image: busybox
        command: ['sh', '-c', 'echo "Hello, Kubernetes!" && sleep 3600']
      restartPolicy: OnFailure

apply trais on template

traits traits.yaml job.yaml | yp -y
apiVersion: batch/v1
kind: Job
metadata:
  name: hello
spec:
  template:
    spec:
      containers:
        - name: HELLO
          image: busybox:latest
          command:
            - sh
            - -c
            - echo "Hello, Kubernetes!" && sleep 3600
          env:
            - name: PYTHONUNBUFFERD
              value: 1
      restartPolicy: Never

Metadata

Release files for pytraits 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytraits 0.0.2
File Size Uploaded Provenance
pytraits-0.0.2.tar.gz 2.4 kB Without provenance Details

Release files / pytraits-0.0.2.tar.gz

Download URL pytraits-0.0.2.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7b77191633eb71ccdf60a8d94f8c7df257f088f4e8121cc81fc9f5fe844a965c
BLAKE2b-256 checksum
How to use checksums
0b37c72ddc0e99d1de56c8c1b8de9cb43e33785444bc416fd12319a72d66391d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.10

Security for pytraits 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page