Include Content of GitHub File

Include the contents of a file from a public GitHub repo

This shortcode is from https://github.com/haideralipunjabi/hugo-shortcodes/tree/master/github

Usage

{{< github repo="username/repo-name" file="/path/to/file" lang="language" options="highlight-options" >}}

Options Reference
Language Reference

spinnakerservice.yml from public armory/spinnaker-operator

{{< github repo="armory/spinnaker-operator" file="/deploy/spinnaker/complete/spinnakerservice.yml" lang="yaml" options="" >}}
apiVersion: spinnaker.io/v1alpha2 kind: SpinnakerService metadata: name: spinnaker spec: # spec.spinnakerConfig - This section is how to specify configuration spinnaker spinnakerConfig: # spec.spinnakerConfig.config - This section contains the contents of a deployment found in a halconfig .deploymentConfigurations[0] config: version: 1.28.1 # the version of Spinnaker to be deployed persistentStorage: persistentStoreType: s3 s3: bucket: <change-me> # Change to a unique name. Spinnaker stores application and pipeline definitions here rootFolder: front50 # spec.spinnakerConfig.profiles - This section contains the YAML of each service's profile profiles: clouddriver: {} # is the contents of ~/.hal/default/profiles/clouddriver.yml # deck has a special key "settings-local.js" for the contents of settings-local.js deck: # settings-local.js - contents of ~/.hal/default/profiles/settings-local.js # Use the | YAML symbol to indicate a block-style multiline string settings-local.js: | window.spinnakerSettings.feature.kustomizeEnabled = true; echo: {} # is the contents of ~/.hal/default/profiles/echo.yml fiat: {} # is the contents of ~/.hal/default/profiles/fiat.yml front50: {} # is the contents of ~/.hal/default/profiles/front50.yml gate: {} # is the contents of ~/.hal/default/profiles/gate.yml igor: {} # is the contents of ~/.hal/default/profiles/igor.yml kayenta: {} # is the contents of ~/.hal/default/profiles/kayenta.yml orca: {} # is the contents of ~/.hal/default/profiles/orca.yml rosco: {} # is the contents of ~/.hal/default/profiles/rosco.yml # spec.spinnakerConfig.service-settings - This section contains the YAML of the service's service-setting # see https://www.spinnaker.io/reference/halyard/custom/#tweakable-service-settings for available settings service-settings: clouddriver: {} deck: {} echo: {} fiat: {} front50: {} gate: {} igor: {} kayenta: {} orca: {} rosco: {} # spec.spinnakerConfig.files - This section allows you to include any other raw string files not handle above. # The KEY is the filepath and filename of where it should be placed # - Files here will be placed into ~/.hal/default/ on halyard # - __ is used in place of / for the path separator # The VALUE is the contents of the file. # - Use the | YAML symbol to indicate a block-style multiline string # - We currently only support string files # - NOTE: Kubernetes has a manifest size limitation of 1MB files: {} # profiles__rosco__packer__example-packer-config.json: | # { # "packerSetting": "someValue" # } # profiles__rosco__packer__my_custom_script.sh: | # #!/bin/bash -e # echo "hello world!" # spec.expose - This section defines how Spinnaker should be publicly exposed expose: type: service # Kubernetes LoadBalancer type (service/ingress), note: only "service" is supported for now service: type: LoadBalancer # annotations to be set on Kubernetes LoadBalancer type # they will only apply to spin-gate, spin-gate-x509, or spin-deck annotations: service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http # uncomment the line below to provide an AWS SSL certificate to terminate SSL at the LoadBalancer #service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-west-2:9999999:certificate/abc-123-abc # provide an override to the exposing KubernetesService overrides: {} # Provided below is the example config for the Gate-X509 configuration # deck: # annotations: # service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-west-2:9999999:certificate/abc-123-abc # service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http # gate: # annotations: # service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-west-2:9999999:certificate/abc-123-abc # service.beta.kubernetes.io/aws-load-balancer-backend-protocol: https # X509 requires https from LoadBalancer -> Gate # gate-x509: # annotations: # service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp # service.beta.kubernetes.io/aws-load-balancer-ssl-cert: null # publicPort: 443 validation: {} # Patching of generated service or deployment by Spinnaker service. # Like in Kustomize, several patch types are supported. See # https://github.com/armory/spinnaker-operator/blob/master/doc/options.md#speckustomize kustomize: {} # An example to change Gate's image name using a strategic merge patch # gate: # deployment: # patchesStrategicMerge: # - | # spec: # template: # spec: # containers: # - name: gate # image: gate:1.0.0

spinnakerservice.yml from private armory-io/spinnaker-operator

{{< github repo="armory-io/spinnaker-operator" file="/deploy/spinnaker/basic/SpinnakerService.yml" lang="yaml" options="" >}}

{{< github repo=“armory-io/spinnaker-operator” file="/deploy/spinnaker/basic/SpinnakerService.yml" lang=“yaml” options="" >}}

surround with collapsible panel

Expand to see file

{{< github repo=“armory-io/spinnaker-operator” file="/deploy/spinnaker/basic/SpinnakerService.yml" lang=“yaml” options=“linenos=table” >}}

Show me the manifest
apiVersion: kustomize.config.k8s.io/v1alpha1 kind: Component patchesStrategicMerge: - feature.yml - patch-labels.yaml configMapGenerator: # ConfigMap holding OPA policy definitions for use by Armory's Policy Engine. Required by policy-engine-plugin - name: spin-policies options: disableNameSuffixHash: true files: - policies/manual-judgement.rego - policies/pipeline-trigger.rego

Last modified August 9, 2023: (450bb449)