Framework Management

By leveraging Shipa, you can quickly provision frameworks that automatically enforce governance policies when deploying applications.

apiVersion: shipa.crossplane.io/v1alpha1
kind: Framework
metadata:
  name: cp-dev
spec:
  forProvider:
    shipaFramework: cp-dev
    resources:
      general:
        setup:
          default: false
          provisioner: kubernetes
          public: false
          kubernetesNamespace: existing-namespace
        router: nginx
        plan:
          name: "plan-name"
        access:
          append: ["shipa-team"]
        nodeSelectors:
          terms:
            environment: team1
            os: linux
          strict: true
        podAutoScaler:
          minReplicas: 1
          maxReplicas: 10
          targetCPUUtilizationPercentage: 50
          disableAppOverride: true
        domainPolicy:
          allowedCnames:
            - "*.example.com"
            - "*.acme.bar"
        appAutoDiscovery:
          appSelector:
            - label: app
          suffix: "" 
        security:
          disableScan: true
          ignoreComponents: ["apt", "bash", "..."]
          ignoreCves: ["CVE-2020-27350", "CVE-2011-3374", "..."]
        networkPolicy:
          ingress:
            policy_mode: allow-custom-rules-only
              custom_rules:
                id: rule-name
                description: "networking rule"
                enabled: true
                allowed_apps: ["app1", "app2", "app3", "appX"]
                allowed_frameworks: ["fw1", "fw2]
                ports:
                   port: 8080
                   protocol: TCP
                   port: 8081
                   protocol: TCP
          egress:
            policy_mode: allow-all
          disableAppPolicies: false
        containerPolicy:
          allowedHosts: ["docker.io/shipasoftware", "docker.io/shiparepo"]

Top-Level Attributes

ComponentTypeDefinition
apiVersionstringthe version of the API.
kindstringthe kind of custom resource that will be created by Shipa.

Framework is the kind used by Shipa for creating applications.
metadatathe name of the custom resource that will be created by Shipa.
specthe specification that will be used by Shipa when creating the framework.

Metadata

ComponentTypeDescription
namestringthe name of the custom resource that will be created by Shipa.

Specification

Component path: spec > forProvider

ComponentTypeDescription
shipaFrameworkstringthe name of the framework that should be created by Shipa.

Required: Yes
resourcesthe general settings that should be used by Shipa when creating the framework.

Required: Yes

General

Component path: spec > forProvider > resources > general

ComponentTypeDescription
setupdefines the provisioner that should be used by the framework when deploying applications

Required: Yes
routerstringthe router that should be assigned to the framework so an endpoint can automatically be created for the applications deployed through this framework.

If not specified, Shipa will default to Traefik and automatically configure the Traefik as the ingress.

Required: No
Options:
- istio
- ngnix
- traefik
planthe name of the resource plan that should be used by this framework when applications are deployed through it.

Required: No
nodeSelectorlimits which nodes can be used when applications are deployed using the framework.

Required: No
podAutoScalerimplements default autoscale rules for applications deployed using the framework.

Required: No
domainPolicylimits the domains developers can use when adding CNAMEs to their applications.

Required: No
appAutoDiscoveryDiscovers and displays on Shipa dashboard any existing applications.

For this to work, you need to connect the framework to an existing namespace in your cluster by using the kubernetesNamespace property.

Required: No
securitydefines the level of security scan that will be automatically run on every application deployed through this framework.

Required: No
networkPolicydefines default network policies that will be assigned to every application deployed through this framework.

Required: No
containerPolicylimits which container registries can be used when deploying applications to this framework.

Required: No

Setup

Component path: spec > forProvider > resources > general > setup

ComponentTypeDefinition
defaultbooleanwhen developers do not specify a framework to deploy their applications, the framework marked as default will be used automatically.

Required: No
provisionerstringthe provisioner that should be used by this framework when deploying applications

Options:
- shipa
- kubernetes

Required: Yes
Default: If not specified, Shipa will automatically assign Kubernetes.
publicbooleanif the framework should be publicly exposed to all teams available on Shipa.

Required: No
Default: If not specified, the framework will be private to a select group of teams
kubernetesNamespacestringIf you are connecting this framework to an existing namespace in your cluster, this should be the name of the existing namespace.

Required: No
Default: If not specified, Shipa will automatically create a new namespace for the framework once you connect this framework to a cluster.

Resource Plan

Component path: spec > forProvider > resources > general > plan

ComponentTypeDescription
namestringthe name of the resource plan that should be used by this framework when applications are deployed through it.

If not specified, Shipa will use an existing plan that is exposed as default.

Required: No

Node Selector

Component path: spec > forProvider > resources > general > nodeSelector

ComponentTypeDescription
termsThe combination of lable: value that Shipa should use when finding a node to deploy applications bound to the framework.

Multiple options can be defined, one per line.

Required: Yes
strictbooleanWhen specifying multiple values, users can enable strict to make sure Shipa finds nodes where all values are true.

Required: Yes

Pod Autoscaler

Component path: spec > forProvider > resources > general > podAutoScaler

ComponentTypeDescription
minReplicasintthe minimum number of replicas applications deployed using this framework should have.

Required: Yes
maxReplicasintthe maximum number of replicas applications deployed using this framework should have.

Required: Yes
targetCPUUtilizationPercentageintthe target CPU utilization that should trigger the auto scale rule for the application.

Required: Yes
disableAppOverridebooleandefines if the auto scale rule assigned automatically to the applications deployed using the framework can be changed post-deployment.

Required: Yes

Domain Policy

Component path: spec > forProvider > resources > general > domainPolicy

ComponentTypeDescription
allowedCnamesstringone, or multiple, allowed domains developers can use to assign to their applications as CNAME.

Required: Yes

Application Discovery

Component path: spec > forProvider > resources > general > appAutoDiscovery

ComponentTypeDescription
appSelectorstringthe label that Shipa should look for when importing and exposing applications on the dashboard once the framework is connected to a cluster.

For applications to be imported, the appSelector should be used together with the kubernetesNamespace option.

Required: Yes
suffixstringsuffix that should be automatically added to an application name when imported.

Required: No

Security

Component path: spec > forProvider > resources > general > security

ComponentTypeDescription
disableScanboolif application scanning should be disabled when applications are deployed using the framework.

By default, unless changed, it will be enabled when creating the framework.

Required: No
ignoreComponentsstringBy default, if security scanning is not disabled, Shipa won't allow any component vulnerabilities to be deployed to through this framework.

If there are specific components that should be ignored by Shipa during deployments using this framework, they should be listed here.

Required: No
ignoreCvesstringBy default, if security scanning is not disabled, Shipa won't allow any CVES vulnerabilities to be deployed to the framework.

If there are specific CVES that should be ignored by Shipa during deployments using this framework, they should be listed here.

Required: No

Network Policy

Component path: spec > forProvider > resources > general > networkPolicy

ComponentTypeDescription
ingressingress definition that will be accepted by applications deployed using the framework.

if not defined, Shipa will automatically assign an allow-all ingress policy for applications deployed through the framework.

Required: No
policy_modestringthe policy mode that should be applied to applications deployed through the framework.

Current options from this provider are:
- allow-all
- deny-all
- allow-custom-rules-only

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only
custom_rulesif policy_mode is set to allow-custom-rules-only, users can define custom rules for detailed ingress or egress configuration for applications deployed through the framework.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only
idstringthe name of the custom rule.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only
enabledboolif the custom rule is enabled by default or not when applications are deployed through the framework.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only
descriptionstringThe description of the custom rule being enforced by the framework.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only
allowed_appsstringthe specific applications that applications deployed through the framework can receive ingress or ingress from.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only
allowed_frameworksstringallow traffic from applications deployed through this, or list of, frameworks.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only
portsport configuration where applications deployed through the framework can accept ingress or egress.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only
portintThe specific port (or list of ports) where applications deployed through the framework can accept ingress or egress.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only
protocolstringThe specific protocol where applications deployed through the framework can accept ingress or egress.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only
egressegress definition that will be accepted by applications deployed using the framework.

if not defined, Shipa will automatically assign an allow-all egress policy for applications deployed through the framework.

Required: No
disable_app_policiesbooldefines if application owners can change ingress and/or egress rules at the application-level post-deployment.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only

📘

Detailed network policies

Shipa enables you to define more granular network policies through its dashboard. If rules are overly complex, we recommend using the dashboard to define a sample framework and network policy.

Exporting the framework configuration, giving you your detailed network policy configuration in a file.

Container Policy

Component path: spec > forProvider > resources > general > containerPolicy

ComponentTypeDescription
allowedHostsstringthe container registry (or list of) developers can use when deploying their applications through the framework.

if not specified, developers will be able to deploy images from any container registry

Required: No