Skip to content

Commit

Permalink
Merge branch 'main' into feat/grpc-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewhare authored Apr 30, 2024
2 parents ef24fc2 + cf1e3bd commit e863838
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 6 deletions.
14 changes: 14 additions & 0 deletions pkg/apis/akash.network/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,20 @@ spec:
type: string
model:
type: string
credentials:
type: object
nullable: true
properties:
host:
type: string
email:
type: string
email:
type: string
username:
type: string
password:
type: string
- name: v2beta1
served: false
storage: false
Expand Down
30 changes: 24 additions & 6 deletions pkg/apis/akash.network/v2beta2/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,19 @@ type Manifest struct {
// ManifestList stores metadata and items list of manifest
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ManifestList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
metav1.TypeMeta ` json:",inline"`
metav1.ListMeta ` json:"metadata"`
Items []Manifest `json:"items"`
}

// ManifestServiceCredentials stores docker registry credentials
type ManifestServiceCredentials struct {
Host string `json:"host"`
Email string `json:"email"`
Username string `json:"username"`
Password string `json:"password"`
}

// ManifestService stores name, image, args, env, unit, count and expose list of service
type ManifestService struct {
// Service name
Expand All @@ -46,8 +54,9 @@ type ManifestService struct {
// Overlay Network Links
Expose []ManifestServiceExpose `json:"expose,omitempty"`
// Miscellaneous service parameters
Params *ManifestServiceParams `json:"params,omitempty"`
SchedulerParams *SchedulerParams `json:"scheduler_params,omitempty"`
Params *ManifestServiceParams `json:"params,omitempty"`
SchedulerParams *SchedulerParams `json:"scheduler_params,omitempty"`
Credentials *ManifestServiceCredentials `json:"credentials,omitempty"`
}

// ManifestGroup stores metadata, name and list of SDL manifest services
Expand All @@ -71,8 +80,8 @@ type ManifestStatus struct {
}

type ManifestStorageParams struct {
Name string `json:"name" yaml:"name"`
Mount string `json:"mount" yaml:"mount"`
Name string `json:"name" yaml:"name"`
Mount string `json:"mount" yaml:"mount"`
ReadOnly bool `json:"readOnly" yaml:"readOnly"`
}

Expand Down Expand Up @@ -302,6 +311,15 @@ func manifestServiceFromProvider(ams mani.Service, schedulerParams *SchedulerPar
}
}

if ams.Credentials != nil {
ms.Credentials = &ManifestServiceCredentials{
Host: ams.Credentials.Host,
Email: ams.Credentials.Email,
Username: ams.Credentials.Username,
Password: ams.Credentials.Password,
}
}

return ms, nil
}

Expand Down
21 changes: 21 additions & 0 deletions pkg/apis/akash.network/v2beta2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e863838

Please sign in to comment.