Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PlatformCredentialsSet API client (#580)
Preparing for the implementation of the **PlatformCredentialsSet per Stack** feature, this Pull Request adds `PlatformCredentialsSet` to the zalando.org/v1 api. Signed-off-by: Katyanna Moura <amelie.kn@gmail.com> Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de> Co-authored-by: Mikkel Oscar Lyderik Larsen <mikkeloscar@users.noreply.github.com>
- Loading branch information
1 parent
2104a96
commit cc42b67
Showing
16 changed files
with
1,072 additions
and
146 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.9.2 | ||
creationTimestamp: null | ||
name: platformcredentialssets.zalando.org | ||
spec: | ||
group: zalando.org | ||
names: | ||
kind: PlatformCredentialsSet | ||
listKind: PlatformCredentialsSetList | ||
plural: platformcredentialssets | ||
singular: platformcredentialsset | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: PlatformCredentialsSet describes a platform credentials set | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: PlatformCredentialsSpec is the spec part of the StackSet. | ||
properties: | ||
application: | ||
type: string | ||
clients: | ||
additionalProperties: | ||
properties: | ||
grant: | ||
type: string | ||
realm: | ||
type: string | ||
redirectUri: | ||
type: string | ||
required: | ||
- grant | ||
- realm | ||
- redirectUri | ||
type: object | ||
type: object | ||
token_version: | ||
type: string | ||
tokens: | ||
additionalProperties: | ||
properties: | ||
privileges: | ||
items: | ||
type: string | ||
type: array | ||
required: | ||
- privileges | ||
type: object | ||
type: object | ||
required: | ||
- application | ||
- clients | ||
- token_version | ||
- tokens | ||
type: object | ||
status: | ||
description: PlatformCredentialsStatus is the status part of the Stack. | ||
properties: | ||
clients: {} | ||
errors: | ||
items: | ||
type: string | ||
type: array | ||
observedGeneration: | ||
format: int64 | ||
type: integer | ||
problems: | ||
items: | ||
type: string | ||
type: array | ||
tokens: {} | ||
required: | ||
- clients | ||
- errors | ||
- observedGeneration | ||
- problems | ||
- tokens | ||
type: object | ||
required: | ||
- spec | ||
- status | ||
type: object | ||
served: true | ||
storage: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package v1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// +genclient | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// PlatformCredentialsSet describes a platform credentials set | ||
// +k8s:deepcopy-gen=true | ||
type PlatformCredentialsSet struct { | ||
metav1.TypeMeta `json:""` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec PlatformCredentialsSpec `json:"spec"` | ||
Status PlatformCredentialsStatus `json:"status"` | ||
} | ||
|
||
// PlatformCredentialsSpec is the spec part of the StackSet. | ||
// +k8s:deepcopy-gen=true | ||
type PlatformCredentialsSpec struct { | ||
Application string `json:"application"` | ||
Clients map[string]Client `json:"clients"` | ||
Tokens map[string]Token `json:"tokens"` | ||
TokenVersion string `json:"token_version"` | ||
} | ||
|
||
// +k8s:deepcopy-gen=true | ||
type Client struct { | ||
Realm string `json:"realm"` | ||
Grant string `json:"grant"` | ||
RedirectURI string `json:"redirectUri"` | ||
} | ||
|
||
// +k8s:deepcopy-gen=true | ||
type Token struct { | ||
Privileges []string `json:"privileges"` | ||
} | ||
|
||
// PlatformCredentialsStatus is the status part of the Stack. | ||
// +k8s:deepcopy-gen=true | ||
type PlatformCredentialsStatus struct { | ||
ObservedGeneration int64 `json:"observedGeneration"` | ||
Errors []string `json:"errors"` | ||
Problems []string `json:"problems"` | ||
Tokens map[string]struct{} `json:"tokens"` | ||
Clients map[string]struct{} `json:"clients"` | ||
} | ||
|
||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// PlatformCredentialsSetList is a list of StackSets. | ||
// +k8s:deepcopy-gen=true | ||
type PlatformCredentialsSetList struct { | ||
metav1.TypeMeta `json:""` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
|
||
Items []PlatformCredentialsSet `json:"items"` | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.