github.com/rancher/types@v0.0.0-20220328215343-4370ff10ecd5/apis/project.cattle.io/v3/types.go (about)

     1  package v3
     2  
     3  import (
     4  	"github.com/rancher/norman/types"
     5  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
     6  )
     7  
     8  type ServiceAccountToken struct {
     9  	types.Namespaced
    10  
    11  	metav1.TypeMeta   `json:",inline"`
    12  	metav1.ObjectMeta `json:"metadata,omitempty"`
    13  
    14  	AccountName string `json:"accountName"`
    15  	AccountUID  string `json:"accountUid"`
    16  	Description string `json:"description"`
    17  	Token       string `json:"token" norman:"writeOnly"`
    18  	CACRT       string `json:"caCrt"`
    19  }
    20  type NamespacedServiceAccountToken ServiceAccountToken
    21  
    22  type DockerCredential struct {
    23  	types.Namespaced
    24  
    25  	metav1.TypeMeta   `json:",inline"`
    26  	metav1.ObjectMeta `json:"metadata,omitempty"`
    27  
    28  	Description string                        `json:"description"`
    29  	Registries  map[string]RegistryCredential `json:"registries"`
    30  }
    31  type NamespacedDockerCredential DockerCredential
    32  
    33  type RegistryCredential struct {
    34  	Description string `json:"description"`
    35  	Username    string `json:"username"`
    36  	Password    string `json:"password" norman:"writeOnly"`
    37  	Auth        string `json:"auth" norman:"writeOnly"`
    38  	Email       string `json:"email"`
    39  }
    40  
    41  type Certificate struct {
    42  	types.Namespaced
    43  
    44  	metav1.TypeMeta   `json:",inline"`
    45  	metav1.ObjectMeta `json:"metadata,omitempty"`
    46  
    47  	Description string `json:"description"`
    48  	Certs       string `json:"certs"`
    49  	Key         string `json:"key" norman:"writeOnly"`
    50  
    51  	CertFingerprint         string   `json:"certFingerprint" norman:"nocreate,noupdate"`
    52  	CN                      string   `json:"cn" norman:"nocreate,noupdate"`
    53  	Version                 string   `json:"version" norman:"nocreate,noupdate"`
    54  	ExpiresAt               string   `json:"expiresAt" norman:"nocreate,noupdate"`
    55  	Issuer                  string   `json:"issuer" norman:"nocreate,noupdate"`
    56  	IssuedAt                string   `json:"issuedAt" norman:"nocreate,noupdate"`
    57  	Algorithm               string   `json:"algorithm" norman:"nocreate,noupdate"`
    58  	SerialNumber            string   `json:"serialNumber" norman:"nocreate,noupdate"`
    59  	KeySize                 string   `json:"keySize" norman:"nocreate,noupdate"`
    60  	SubjectAlternativeNames []string `json:"subjectAlternativeNames" norman:"nocreate,noupdate"`
    61  }
    62  type NamespacedCertificate Certificate
    63  
    64  type BasicAuth struct {
    65  	types.Namespaced
    66  
    67  	metav1.TypeMeta   `json:",inline"`
    68  	metav1.ObjectMeta `json:"metadata,omitempty"`
    69  
    70  	Description string `json:"description"`
    71  	Username    string `json:"username"`
    72  	Password    string `json:"password" norman:"writeOnly"`
    73  }
    74  type NamespacedBasicAuth BasicAuth
    75  
    76  type SSHAuth struct {
    77  	types.Namespaced
    78  
    79  	metav1.TypeMeta   `json:",inline"`
    80  	metav1.ObjectMeta `json:"metadata,omitempty"`
    81  
    82  	Description string `json:"description"`
    83  	PrivateKey  string `json:"privateKey" norman:"writeOnly"`
    84  	Fingerprint string `json:"certFingerprint" norman:"nocreate,noupdate"`
    85  }
    86  type NamespacedSSHAuth SSHAuth
    87  
    88  type PublicEndpoint struct {
    89  	NodeName  string   `json:"nodeName,omitempty" norman:"type=reference[/v3/schemas/node],nocreate,noupdate"`
    90  	Addresses []string `json:"addresses,omitempty" norman:"nocreate,noupdate"`
    91  	Port      int32    `json:"port,omitempty" norman:"nocreate,noupdate"`
    92  	Protocol  string   `json:"protocol,omitempty" norman:"nocreate,noupdate"`
    93  	// for node port service endpoint
    94  	ServiceName string `json:"serviceName,omitempty" norman:"type=reference[service],nocreate,noupdate"`
    95  	// for host port endpoint
    96  	PodName string `json:"podName,omitempty" norman:"type=reference[pod],nocreate,noupdate"`
    97  	// for ingress endpoint. ServiceName, podName, ingressName are mutually exclusive
    98  	IngressName string `json:"ingressName,omitempty" norman:"type=reference[ingress],nocreate,noupdate"`
    99  	// Hostname/path are set for Ingress endpoints
   100  	Hostname string `json:"hostname,omitempty" norman:"nocreate,noupdate"`
   101  	Path     string `json:"path,omitempty" norman:"nocreate,noupdate"`
   102  	// True when endpoint is exposed on every node
   103  	AllNodes bool `json:"allNodes" norman:"nocreate,noupdate"`
   104  }
   105  
   106  type Workload struct {
   107  	types.Namespaced
   108  	metav1.TypeMeta   `json:",inline"`
   109  	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
   110  }
   111  
   112  type DeploymentRollbackInput struct {
   113  	ReplicaSetID string `json:"replicaSetId" norman:"type=reference[replicaSet]"`
   114  }
   115  
   116  type WorkloadMetric struct {
   117  	Port   int32  `json:"port,omitempty"`
   118  	Path   string `json:"path,omitempty"`
   119  	Schema string `json:"schema,omitempty" norman:"type=enum,options=HTTP|HTTPS"`
   120  }