Assistant: codex Assistant-Model: gpt-5.6-luna Assistant-Session: 01a087b0-7b1e-7531-8ef3-6525ebaf7ee7
174 lines
4.9 KiB
YAML
174 lines
4.9 KiB
YAML
fiam_version: '0.2'
|
|
instance:
|
|
id: specimen.composition.kubectl-api
|
|
kind: specimen
|
|
title: kubectl CLI contract uses Kubernetes API contract
|
|
status: provisional
|
|
intent: Exercise uses relation between distinct CLI and API contracts and a multi-step apply flow.
|
|
nodes:
|
|
- id: node.kubectl
|
|
kind: system-node
|
|
name: kubectl
|
|
node_type: fiam.node-type.application
|
|
- id: node.apiserver
|
|
kind: system-node
|
|
name: Kubernetes API Server
|
|
node_type: fiam.node-type.service
|
|
ports:
|
|
- id: port.kubectl.cli
|
|
owner: node.kubectl
|
|
participations:
|
|
- contract: contract.kubectl-cli
|
|
mode: offers
|
|
roles:
|
|
- fiam.role.service-provider
|
|
- id: port.kubectl.api
|
|
owner: node.kubectl
|
|
participations:
|
|
- contract: contract.k8s-api
|
|
mode: requires
|
|
roles:
|
|
- fiam.role.client
|
|
- id: port.apiserver.api
|
|
owner: node.apiserver
|
|
participations:
|
|
- contract: contract.k8s-api
|
|
mode: offers
|
|
roles:
|
|
- fiam.role.server
|
|
contracts:
|
|
- id: contract.kubectl-cli
|
|
kind: interface-contract
|
|
name: kubectl CLI
|
|
operations:
|
|
- id: operation.kubectl.apply
|
|
name: apply
|
|
interaction_style: fiam.interaction-style.command
|
|
- id: contract.k8s-api
|
|
kind: interface-contract
|
|
name: Kubernetes API
|
|
operations:
|
|
- id: operation.k8s.patch
|
|
name: patch
|
|
interaction_style: fiam.interaction-style.request-response
|
|
bindings:
|
|
- id: binding.kubectl.local
|
|
contract: contract.kubectl-cli
|
|
provider_port: port.kubectl.cli
|
|
communication_stack:
|
|
- role: fiam.stack-role.ipc-process-carrier
|
|
term: fiam.carrier.stdio
|
|
- id: binding.k8s.https
|
|
contract: contract.k8s-api
|
|
provider_port: port.apiserver.api
|
|
consumer_ports:
|
|
- port.kubectl.api
|
|
communication_stack:
|
|
- role: fiam.stack-role.application-transfer-protocol
|
|
term: fiam.protocol.http
|
|
- role: fiam.stack-role.security-protocol
|
|
term: fiam.protocol.tls
|
|
information_resources:
|
|
- id: resource.manifest
|
|
kind: information-resource
|
|
owner: node.kubectl
|
|
name: deployment.yaml
|
|
resource_kind: fiam.information-resource.file
|
|
resource_scope: fiam.resource-scope.concrete-instance
|
|
selectors:
|
|
- kind: fiam.resource-selector.filesystem-path
|
|
value: ./deployment.yaml
|
|
information_shapes:
|
|
- id: shape.k8s-manifest
|
|
kind: information-shape
|
|
name: Kubernetes resource manifest
|
|
shape_kind: fiam.information-shape.object
|
|
interactions:
|
|
- id: interaction.kubectl.apply
|
|
kind: interaction
|
|
operation: operation.kubectl.apply
|
|
binding: binding.kubectl.local
|
|
realization_status: fiam.interaction-status.executed
|
|
- id: interaction.k8s.patch
|
|
kind: interaction
|
|
operation: operation.k8s.patch
|
|
binding: binding.k8s.https
|
|
realization_status: fiam.interaction-status.executed
|
|
interaction_flows:
|
|
- id: flow.kubectl.apply
|
|
kind: interaction-flow
|
|
name: kubectl apply flow
|
|
flow_type: fiam.flow.orchestration
|
|
steps:
|
|
- sequence: 1
|
|
interaction: interaction.kubectl.apply
|
|
- sequence: 2
|
|
interaction: interaction.k8s.patch
|
|
assertions:
|
|
- id: assertion.kubectl-uses-api
|
|
assertion_kind: relation
|
|
subject: contract.kubectl-cli
|
|
predicate: fiam.relation.uses
|
|
polarity: asserted
|
|
object_ref: contract.k8s-api
|
|
evidence:
|
|
mode: fiam.evidence.declared
|
|
source: FIAM v0.2 semantic specimen
|
|
confidence: 0.98
|
|
- id: assertion.apply-reads-manifest
|
|
assertion_kind: relation
|
|
subject: interaction.kubectl.apply
|
|
predicate: fiam.relation.reads-from
|
|
polarity: asserted
|
|
object_ref: resource.manifest
|
|
evidence:
|
|
mode: fiam.evidence.declared
|
|
source: FIAM v0.2 semantic specimen
|
|
confidence: 0.98
|
|
- id: assertion.manifest-conforms
|
|
assertion_kind: relation
|
|
subject: resource.manifest
|
|
predicate: fiam.relation.conforms-to-shape
|
|
polarity: asserted
|
|
object_ref: shape.k8s-manifest
|
|
evidence:
|
|
mode: fiam.evidence.declared
|
|
source: FIAM v0.2 semantic specimen
|
|
confidence: 0.98
|
|
- id: assertion.patch-accepts
|
|
assertion_kind: relation
|
|
subject: interaction.k8s.patch
|
|
predicate: fiam.relation.accepts-shape
|
|
polarity: asserted
|
|
object_ref: shape.k8s-manifest
|
|
evidence:
|
|
mode: fiam.evidence.declared
|
|
source: FIAM v0.2 semantic specimen
|
|
confidence: 0.98
|
|
facets:
|
|
role: fiam.shape-role.request
|
|
representation: fiam.representation.json
|
|
tests:
|
|
stresses:
|
|
- distinct-cli-and-api-contracts
|
|
- uses-relation
|
|
- workflow-over-file-and-api
|
|
notes:
|
|
- kubectl is a separate contract that uses the Kubernetes API rather than being another binding of the same contract.
|
|
expected_properties:
|
|
- id: check.kubectl-uses
|
|
kind: relation-exists
|
|
subject: contract.kubectl-cli
|
|
predicate: fiam.relation.uses
|
|
object_ref: contract.k8s-api
|
|
- id: check.kubectl-manifest
|
|
kind: relation-exists
|
|
subject: resource.manifest
|
|
predicate: fiam.relation.conforms-to-shape
|
|
object_ref: shape.k8s-manifest
|
|
- id: check.evidence
|
|
kind: all-assertions-have-evidence
|
|
- id: check.no-deprecated
|
|
kind: no-deprecated-terms
|
|
- id: check.no-legacy-representations
|
|
kind: no-legacy-representations
|