-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preparing for the implementation of the PlatformCredentialsSet per Stack feature, this commit adds PlatformCredentialsSet to the zalando.org/v1 api. Signed-off-by: Katyanna Moura <amelie.kn@gmail.com>
- Loading branch information
Showing
9 changed files
with
358 additions
and
0 deletions.
There are no files selected for viewing
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
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.
4 changes: 4 additions & 0 deletions
4
pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_zalando.org_client.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
pkg/client/clientset/versioned/typed/zalando.org/v1/generated_expansion.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
pkg/client/clientset/versioned/typed/zalando.org/v1/zalando.org_client.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.