Skip to content

Commit

Permalink
Merge pull request redhat-developer#48 from bf2fc6cc711aee1a0c2a/plug…
Browse files Browse the repository at this point in the history
…in-fixes

chore: remove invalid config samples
  • Loading branch information
secondsun authored Feb 1, 2021
2 parents 75b935c + 7c5d685 commit e40e2c4
Show file tree
Hide file tree
Showing 93 changed files with 187 additions and 9,768 deletions.
49 changes: 45 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,54 @@
# Operator source
# RHOAS Operator

## Getting started

### Prerequisites

- Java 11+
- mvn
- OpenShift Client (or kubernetes)

### Running Operator

1. Login to your OpenShift cluster
`oc login`

2. Install dependencies
```
mvn clean install
```

3. Run operator

`cd source/rhoas; mvn quarkus:dev`

3. See ./examples folder for example CR's workflow that should be used to test operator

## Folder structure

```
├── api-mock contains service api mocks
├── docs documentation
├── examples CR examples for testing
├── olm OLM configuration for deployment
└── source Java packages
```

Java Source packages
```
├── model CR model files used to call kubernetes api
├── openapi Contains POJOS that conform to OpenAPI spec
├── rhoas API controllers
```

## Running Locally
`cd rhoas; mvn quarkus:dev`

## Building Operator Image

This will build an operator image and push it to quay.io/secondusn/rhoas-operator.

`mvn clean install -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true`.

## Updating olm
## Updating olm images

Replace the image in `rhoas-operator.v0.0.1.clusterserviceversion.yaml` with your new operator image and follow the instruction in the olm readme.
6 changes: 0 additions & 6 deletions config/samples/mkrSample.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions config/samples/rhoas_v1_managedserviceaccount.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions config/samples/sample.yaml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ metadata:
namespace: rhoas-operator-testing
spec:
## Name of the credentials object
serviceAccountName: "myServiceAccount"
## If true, the operator will issue a reset account API call
## instead of a create account call
reset: false (default) or true
serviceAccountDescription: "Some service account"
serviceAccountName: "RhoasOperatorServiceAccount"
serviceAccountDescription: "Operator created service account"
## Tells operator to create credentials secret with specific name
serviceAccountSecretName: service-account-credentials

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ spec:
properties:
serviceAccountSecretName:
type: string
additionalProperties:
type: object
type: object
additionalProperties:
type: object
type: object
additionalProperties:
type: object
status:
properties:
Expand All @@ -44,13 +38,9 @@ spec:
properties:
host:
type: string
additionalProperties:
type: object
type: object
serviceAccountSecretName:
type: string
additionalProperties:
type: object
type: object
type: object
versions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
kind: ManagedKafkaRequest
plural: managedkafkarequests
shortNames:
- mkr
- mkr
singular: managedkafkarequest
scope: Namespaced
subresources:
Expand All @@ -20,22 +20,19 @@ spec:
properties:
accessTokenSecretName:
type: string
additionalProperties:
type: object
type: object
additionalProperties:
type: object

status:
properties:
message:
type: string
updated:
type: string
type: string
lastUpdate:
type: string
userKafkas:
type: object
additionalProperties:
type: array
items:
type: object
properties:
id:
Expand All @@ -48,11 +45,18 @@ spec:
type: string
owner:
type: string
additionalProperties:
type: object
bootstrapServerHost:
type: string
updatedAt:
type: string
createdAt:
type: string
status:
type: string

type: object
type: object
versions:
- name: v1alpha1
served: true
storage: true
- name: v1alpha1
served: true
storage: true
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ spec:
type: string
accessTokenSecretName:
type: string
additionalProperties:
type: object
type: object
additionalProperties:
type: object
status:
properties:
Expand All @@ -41,8 +37,6 @@ spec:
type: string
serviceAccountSecretName:
type: string
additionalProperties:
type: object
type: object
type: object
versions:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package com.openshift.cloud.v1alpha.models;

import java.util.HashMap;
import java.util.Map;

public class BoostrapServer {

private String host;
private Map<String, Object> additionalProperties = new HashMap<String, Object>();

/** No args constructor for use in serialization */
public BoostrapServer() {}
Expand All @@ -24,12 +21,4 @@ public String getHost() {
public void setHost(String host) {
this.host = host;
}

public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package com.openshift.cloud.v1alpha.models;

import java.util.HashMap;
import java.util.Map;

public class Credentials {

private String serviceAccountSecretName;
private Map<String, Object> additionalProperties = new HashMap<String, Object>();

/** No args constructor for use in serialization */
public Credentials() {}
Expand All @@ -24,12 +21,4 @@ public String getServiceAccountSecretName() {
public void setServiceAccountSecretName(String serviceAccountSecretName) {
this.serviceAccountSecretName = serviceAccountSecretName;
}

public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import io.fabric8.kubernetes.model.annotation.Group;
import io.fabric8.kubernetes.model.annotation.Plural;
import io.fabric8.kubernetes.model.annotation.Version;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
Expand All @@ -24,32 +22,17 @@ public class ManagedKafkaConnection
/** */
private static final long serialVersionUID = 7721054567486507997L;

private Map<String, Object> additionalProperties = new HashMap<String, Object>();

public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

@Override
public String toString() {
return new ToStringBuilder(this)
.append("managedKafkaConnectionSpec", getSpec())
.append("managedKafkaConnectionStatus", getStatus())
.append("additionalProperties", additionalProperties)
.toString();
}

@Override
public int hashCode() {
return new HashCodeBuilder()
.append(getSpec())
.append(getStatus())
.append(additionalProperties)
.toHashCode();
return new HashCodeBuilder().append(getSpec()).append(getStatus()).toHashCode();
}

@Override
Expand All @@ -64,7 +47,6 @@ public boolean equals(Object other) {
return new EqualsBuilder()
.append(getSpec(), rhs.getSpec())
.append(getStatus(), rhs.getStatus())
.append(additionalProperties, rhs.additionalProperties)
.isEquals();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package com.openshift.cloud.v1alpha.models;

import java.util.HashMap;
import java.util.Map;

public class ManagedKafkaConnectionSpec {

private String kafkaId;
private String accessTokenSecretName;
private Credentials credentials;
private Map<String, Object> additionalProperties = new HashMap<String, Object>();

/** No args constructor for use in serialization */
public ManagedKafkaConnectionSpec() {}
Expand Down Expand Up @@ -46,12 +43,4 @@ public Credentials getCredentials() {
public void setCredentials(Credentials credentials) {
this.credentials = credentials;
}

public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package com.openshift.cloud.v1alpha.models;

import java.util.HashMap;
import java.util.Map;

public class ManagedKafkaConnectionStatus {

private String message;
private String updated;
private BoostrapServer boostrapServer;
private String serviceAccountSecretName;
private Map<String, Object> additionalProperties = new HashMap<String, Object>();

/** No args constructor for use in serialization */
public ManagedKafkaConnectionStatus() {}
Expand Down Expand Up @@ -63,12 +60,4 @@ public String getServiceAccountSecretName() {
public void setServiceAccountSecretName(String serviceAccountSecretName) {
this.serviceAccountSecretName = serviceAccountSecretName;
}

public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
}
Loading

0 comments on commit e40e2c4

Please sign in to comment.