package resources
import "github.com/oslokommune/okctl/pkg/scaffold/resources"
Package resources knows how to generate Kubernetes, Kustomize and ArgoCD resources
Index ¶
- func CreateArgoApp(name string, namespace string, sourceRepositoryURL string, sourceRepositoryPath string) argo.Application
- func CreateNamespace(app v1alpha1.Application) corev1.Namespace
- func CreateOkctlDeployment(app v1alpha1.Application) appsv1.Deployment
- func CreateOkctlIngress(app v1alpha1.Application) (networkingv1beta1.Ingress, error)
- func CreateOkctlService(app v1alpha1.Application, mainPortName string) corev1.Service
- func CreateOkctlVolume(app v1alpha1.Application, volume map[string]string) (corev1.PersistentVolumeClaim, error)
- func CreateSecurityGroupPolicy(app v1alpha1.Application) v1beta1.SecurityGroupPolicy
- func CreateServiceMonitor(app v1alpha1.Application, portName string) v1.ServiceMonitor
- func GenerateDefaultArgoApp() argo.Application
- type Kustomization
- func NewKustomization() *Kustomization
- func (k *Kustomization) AddPatch(ref PatchReference)
- func (k *Kustomization) AddResource(resource string)
- func (k *Kustomization) RemovePatch(path string)
- func (k *Kustomization) RemoveResource(path string)
- type PatchReference
- type PatchTarget
Functions ¶
func CreateArgoApp ¶
func CreateArgoApp(name string, namespace string, sourceRepositoryURL string, sourceRepositoryPath string) argo.Application
CreateArgoApp creates an ArgoCD definition customized for okctl
func CreateNamespace ¶
func CreateNamespace(app v1alpha1.Application) corev1.Namespace
CreateNamespace creates a namespace declaration based on an okctl application
func CreateOkctlDeployment ¶
func CreateOkctlDeployment(app v1alpha1.Application) appsv1.Deployment
CreateOkctlDeployment creates a deployment customized for okctl
func CreateOkctlIngress ¶
func CreateOkctlIngress(app v1alpha1.Application) (networkingv1beta1.Ingress, error)
CreateOkctlIngress creates an ingress customized for okctl
func CreateOkctlService ¶
func CreateOkctlService(app v1alpha1.Application, mainPortName string) corev1.Service
CreateOkctlService creates a service customized for okctl
func CreateOkctlVolume ¶
func CreateOkctlVolume(app v1alpha1.Application, volume map[string]string) (corev1.PersistentVolumeClaim, error)
CreateOkctlVolume creates persistent volume claims customized for okctl
func CreateSecurityGroupPolicy ¶
func CreateSecurityGroupPolicy(app v1alpha1.Application) v1beta1.SecurityGroupPolicy
CreateSecurityGroupPolicy creates an initialized security group policy based on an okctl application
func CreateServiceMonitor ¶
func CreateServiceMonitor(app v1alpha1.Application, portName string) v1.ServiceMonitor
CreateServiceMonitor creates a ServiceMonitor definition
func GenerateDefaultArgoApp ¶
func GenerateDefaultArgoApp() argo.Application
GenerateDefaultArgoApp knows how to construct a default ArgoCD application
Types ¶
type Kustomization ¶
type Kustomization struct { Resources []string `json:"resources"` Patches []PatchReference `json:"patches,omitempty"` }
Kustomization represents a single kustomization.yaml file
func NewKustomization ¶
func NewKustomization() *Kustomization
NewKustomization initializes a Kustomization struct
func (*Kustomization) AddPatch ¶
func (k *Kustomization) AddPatch(ref PatchReference)
AddPatch adds elements to the patches attribute of a kustomization file
func (*Kustomization) AddResource ¶
func (k *Kustomization) AddResource(resource string)
AddResource adds elements to the resource attribute of a kustomization file
func (*Kustomization) RemovePatch ¶
func (k *Kustomization) RemovePatch(path string)
RemovePatch removes a PatchReference
func (*Kustomization) RemoveResource ¶
func (k *Kustomization) RemoveResource(path string)
RemoveResource removes a resource
type PatchReference ¶
type PatchReference struct { Path string `json:"path"` Target PatchTarget `json:"target"` }
PatchReference represents an element in the patches attribute in a kustomization file
type PatchTarget ¶
type PatchTarget struct { Kind string `json:"kind"` }
PatchTarget represents a target attribute in a PatchReference attribute
Source Files ¶
argo.go deployment.go doc.go helpers.go ingress.go kustomization.go namespace.go persistentvolumeclaim.go security_group_policy.go service.go servicemonitor.go
- Version
- v0.0.106 (latest)
- Published
- Oct 21, 2022
- Platform
- linux/amd64
- Imports
- 12 packages
- Last checked
- 18 hours ago –
Tools for package owners.